remote-hg: fix for files with spaces
[gitweb.git] / contrib / remote-helpers / git-remote-hg
index a9a1e8fa584e981db5cdb9ea201dbea70f97127d..62c39db5b40c43b1098eb55eb689a4fb8b981f38 100755 (executable)
@@ -565,7 +565,7 @@ def parse_commit(parser):
 
     for line in parser:
         if parser.check('M'):
-            t, m, mark_ref, path = line.split(' ')
+            t, m, mark_ref, path = line.split(' ', 3)
             mark = int(mark_ref[1:])
             f = { 'mode' : hgmode(m), 'data' : blob_marks[mark] }
         elif parser.check('D'):
@@ -704,6 +704,9 @@ def do_export(parser):
         elif ref.startswith('refs/tags/'):
             tag = ref[len('refs/tags/'):]
             parser.repo.tag([tag], node, None, True, None, {})
+        else:
+            # transport-helper/fast-export bugs
+            continue
         print "ok %s" % ref
 
     print