]> git.scripts.mit.edu Git - git.git/commitdiff
Merge branch 'ap/remote-hg-unquote-cquote'
authorJunio C Hamano <gitster@pobox.com>
Fri, 1 Nov 2013 14:38:35 +0000 (07:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 1 Nov 2013 14:38:35 +0000 (07:38 -0700)
A fast-import stream expresses a pathname with funny characters by
quoting them in C style; remote-hg remote helper forgot to unquote
such a path.

* ap/remote-hg-unquote-cquote:
  remote-hg: unquote C-style paths when exporting

1  2 
contrib/remote-helpers/git-remote-hg

index 92d994e470f05db8536ba443a6afb192be8c2452,85abbedb1c75f67a9978388d8642b5cc265c45fc..3222afd9da865087b75efbb1be6ea36e240cb452
@@@ -703,7 -678,15 +703,12 @@@ def get_merge_files(repo, p1, p2, files
              f = { 'ctx' : repo[p1][e] }
              files[e] = f
  
+ def c_style_unescape(string):
+     if string[0] == string[-1] == '"':
+         return string.decode('string-escape')[1:-1]
+     return string
  def parse_commit(parser):
 -    global marks, blob_marks, parsed_refs
 -    global mode
 -
      from_mark = merge_mark = None
  
      ref = parser[1]