summaryrefslogtreecommitdiff
path: root/contrib/remote-helpers/git-remote-hg
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/remote-helpers/git-remote-hg')
-rwxr-xr-xcontrib/remote-helpers/git-remote-hg6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index eb89ef6779..34cda02759 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -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, '/')
@@ -643,7 +644,10 @@ def do_list(parser):
print "? refs/heads/branches/%s" % gitref(branch)
for bmark in bmarks:
- print "? refs/heads/%s" % gitref(bmark)
+ if bmarks[bmark].hex() == '0000000000000000000000000000000000000000':
+ warn("Ignoring invalid bookmark '%s'", bmark)
+ else:
+ print "? refs/heads/%s" % gitref(bmark)
for tag, node in repo.tagslist():
if tag == 'tip':