Mercurial > hg-git
diff hggit/git_handler.py @ 600:ca86479dd2d9
Make the path part of URL contain a leading slash only if it's not followed by tilde. (issue #71)
author | Risto Kankkunen <risto.kankkunen@iki.fi> |
---|---|
date | Thu, 11 Jul 2013 00:22:07 +0300 |
parents | e0089655caa6 |
children | 6da65b534370 |
line wrap: on
line diff
--- a/hggit/git_handler.py Mon Jul 01 16:04:53 2013 -0300 +++ b/hggit/git_handler.py Thu Jul 11 00:22:07 2013 +0300 @@ -1345,7 +1345,7 @@ res = git_match.groupdict() transport = client.SSHGitClient if 'ssh' in res['scheme'] else client.TCPGitClient host, port, sepr, path = res['host'], res['port'], res['sepr'], res['path'] - if sepr == '/': + if sepr == '/' and not path.startswith('~'): path = '/' + path # strip trailing slash for heroku-style URLs # ssh+git://git@heroku.com:project.git/