mirror of
				https://github.com/mnauw/git-remote-hg.git
				synced 2025-10-31 16:45:48 +01:00 
			
		
		
		
	Compare commits
	
		
			6 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 426ed618b2 | ||
|  | 5f34d049b9 | ||
|  | ea7e9bf31a | ||
|  | a3a36883c5 | ||
|  | 0fdd28319a | ||
|  | dfa3ad5fca | 
| @@ -5,6 +5,11 @@ | |||||||
|  |  | ||||||
| from mercurial import hg, ui, commands, util | from mercurial import hg, ui, commands, util | ||||||
| from mercurial import context, subrepo | from mercurial import context, subrepo | ||||||
|  | try: | ||||||
|  |     # hg >= 5.8 | ||||||
|  |     from mercurial.utils import urlutil | ||||||
|  | except ImportError: | ||||||
|  |     from mercurial import util as urlutil | ||||||
|  |  | ||||||
| import re | import re | ||||||
| import sys | import sys | ||||||
| @@ -51,7 +56,13 @@ if sys.version_info[0] == 3: | |||||||
|         stdout = sys.stdout.buffer |         stdout = sys.stdout.buffer | ||||||
|         stderr = sys.stderr.buffer |         stderr = sys.stderr.buffer | ||||||
|         getcwd = os.getcwdb |         getcwd = os.getcwdb | ||||||
|         getenv = os.getenvb if os.supports_bytes_environ else os.getenv |         @staticmethod | ||||||
|  |         def getenvb(val, default): | ||||||
|  |             result = os.getenv(val.decode(), default.decode() if hasattr(default, 'decode') else default) | ||||||
|  |              # if result is a string, get bytes instead | ||||||
|  |             result = result.encode() if hasattr(result, 'encode') else result | ||||||
|  |             return result | ||||||
|  |         getenv = os.getenvb if os.supports_bytes_environ else getenvb | ||||||
| else: | else: | ||||||
|     class compat(basecompat): |     class compat(basecompat): | ||||||
|         # life was simple in those days ... |         # life was simple in those days ... | ||||||
| @@ -308,11 +319,11 @@ class GitHgRepo: | |||||||
|             if not kind in (b'hg', b'git'): |             if not kind in (b'hg', b'git'): | ||||||
|                 warn('skipping unsupported subrepo type %s' % kind) |                 warn('skipping unsupported subrepo type %s' % kind) | ||||||
|                 continue |                 continue | ||||||
|             if not util.url(src).isabs(): |             if not urlutil.url(src).isabs(): | ||||||
|                 parent = self.get_hg_repo_url(remote) |                 parent = self.get_hg_repo_url(remote) | ||||||
|                 if not parent: |                 if not parent: | ||||||
|                     die(b'could not determine repo url of %s' % remote) |                     die(b'could not determine repo url of %s' % remote) | ||||||
|                 parent = util.url(parent) |                 parent = urlutil.url(parent) | ||||||
|                 parent.path = posixpath.join(parent.path or b'', src) |                 parent.path = posixpath.join(parent.path or b'', src) | ||||||
|                 parent.path = posixpath.normpath(parent.path) |                 parent.path = posixpath.normpath(parent.path) | ||||||
|                 src = bytes(parent) |                 src = bytes(parent) | ||||||
|   | |||||||
| @@ -86,7 +86,13 @@ if sys.version_info[0] == 3: | |||||||
|         stdout = sys.stdout.buffer |         stdout = sys.stdout.buffer | ||||||
|         stderr = sys.stderr.buffer |         stderr = sys.stderr.buffer | ||||||
|         getcwd = os.getcwdb |         getcwd = os.getcwdb | ||||||
|         getenv = os.getenvb if os.supports_bytes_environ else os.getenv |         @staticmethod | ||||||
|  |         def getenvb(val, default): | ||||||
|  |             result = os.getenv(val.decode(), default.decode() if hasattr(default, 'decode') else default) | ||||||
|  |              # if result is a string, get bytes instead | ||||||
|  |             result = result.encode() if hasattr(result, 'encode') else result | ||||||
|  |             return result | ||||||
|  |         getenv = os.getenvb if os.supports_bytes_environ else getenvb | ||||||
|         urlparse = urllib.parse.urlparse |         urlparse = urllib.parse.urlparse | ||||||
|         urljoin = urllib.parse.urljoin |         urljoin = urllib.parse.urljoin | ||||||
| else: | else: | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								setup.py
									
									
									
									
									
								
							| @@ -3,7 +3,7 @@ | |||||||
| import setuptools | import setuptools | ||||||
|  |  | ||||||
| # strip leading v | # strip leading v | ||||||
| version = 'v1.0.3.2'[1:] | version = 'v1.0.4'[1:] | ||||||
|  |  | ||||||
| # check for released version | # check for released version | ||||||
| assert (len(version) > 0) | assert (len(version) > 0) | ||||||
|   | |||||||
| @@ -65,3 +65,4 @@ export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME | |||||||
| # maintain backwards compatible default | # maintain backwards compatible default | ||||||
| # (as used in remote helper) | # (as used in remote helper) | ||||||
| git config --global init.defaultBranch master | git config --global init.defaultBranch master | ||||||
|  | git config --global protocol.file.allow always | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user