remote-hg: always normalize paths
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 9 Apr 2014 18:50:01 +0000 (13:50 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Apr 2014 21:20:48 +0000 (14:20 -0700)
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>
contrib/remote-helpers/git-remote-hg
index eb89ef67798e70fd77eff341e3dda5385d3cde48..84e3872d5c5344666b0e4b0241cd609b7359fb2b 100755 (executable)
@@ -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, '/')