Skip to content

Commit

Permalink
remote-hg: always normalize paths
Browse files Browse the repository at this point in the history
Apparently Mercurial can have paths such as 'foo//bar', so normalize all
paths.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Felipe Contreras authored and gitster committed Apr 9, 2014
1 parent fe45cfb commit 867bf7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contrib/remote-helpers/git-remote-hg
Expand Up @@ -260,6 +260,7 @@ class Parser:
return (user, int(date), -tz)

def fix_file_path(path):
path = os.path.normpath(path)
if not os.path.isabs(path):
return path
return os.path.relpath(path, '/')
Expand Down

0 comments on commit 867bf7b

Please sign in to comment.