# HG changeset patch # User Risto Kankkunen # Date 1373491327 -10800 # Node ID ca86479dd2d911bf92d57b66c42146a644c11cdc # Parent e0089655caa6cfa63f250dc5622f4b07c710ad47 Make the path part of URL contain a leading slash only if it's not followed by tilde. (issue #71) diff --git a/hggit/git_handler.py b/hggit/git_handler.py --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -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/