From feff77717364a7541ec33184298e8be5ff361107 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Sat, 30 Jul 2016 19:25:22 +0200 Subject: [PATCH 1/2] Normalize the path using replace(). On Windows `os.path.normpath()` will add backslashes and quotes to the path which git can't handle. --- git-remote-hg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-remote-hg b/git-remote-hg index 1749d43..7d43c5f 100755 --- a/git-remote-hg +++ b/git-remote-hg @@ -265,7 +265,7 @@ class Parser: return (user, int(date), -tz) def fix_file_path(path): - path = os.path.normpath(path) + path.replace('//', '/') if not os.path.isabs(path): return path return os.path.relpath(path, '/') From 5d3ca9cb398a595e56b5ea0cc1170e380cc936aa Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Thu, 1 Sep 2016 12:17:24 +0200 Subject: [PATCH 2/2] Save the replaced string. --- git-remote-hg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-remote-hg b/git-remote-hg index 7d43c5f..f15c569 100755 --- a/git-remote-hg +++ b/git-remote-hg @@ -265,7 +265,7 @@ class Parser: return (user, int(date), -tz) def fix_file_path(path): - path.replace('//', '/') + path = path.replace('//', '/') if not os.path.isabs(path): return path return os.path.relpath(path, '/')