Merge branch 'ap/remote-hg-tilde-is-home-directory'

* ap/remote-hg-tilde-is-home-directory:
  remote-hg: fix path when cloning with tilde expansion
This commit is contained in:
Junio C Hamano 2013-09-04 12:33:57 -07:00
commit 0335b647a2

View File

@ -1124,7 +1124,7 @@ def do_option(parser):
def fix_path(alias, repo, orig_url): def fix_path(alias, repo, orig_url):
url = urlparse.urlparse(orig_url, 'file') url = urlparse.urlparse(orig_url, 'file')
if url.scheme != 'file' or os.path.isabs(url.path): if url.scheme != 'file' or os.path.isabs(os.path.expanduser(url.path)):
return return
abs_url = urlparse.urljoin("%s/" % os.getcwd(), orig_url) abs_url = urlparse.urljoin("%s/" % os.getcwd(), orig_url)
cmd = ['git', 'config', 'remote.%s.url' % alias, "hg::%s" % abs_url] cmd = ['git', 'config', 'remote.%s.url' % alias, "hg::%s" % abs_url]