Skip to content

Commit 867bf7b

Browse files
felipecgitster
authored andcommitted
remote-hg: always normalize paths
Apparently Mercurial can have paths such as 'foo//bar', so normalize all paths. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fe45cfb commit 867bf7b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contrib/remote-helpers/git-remote-hg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ class Parser:
260260
return (user, int(date), -tz)
261261

262262
def fix_file_path(path):
263+
path = os.path.normpath(path)
263264
if not os.path.isabs(path):
264265
return path
265266
return os.path.relpath(path, '/')

0 commit comments

Comments
 (0)