From: Junio C Hamano Date: Fri, 1 Nov 2013 14:38:35 +0000 (-0700) Subject: Merge branch 'ap/remote-hg-unquote-cquote' X-Git-Tag: v1.8.5-rc1~19 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/583736c0bcf09adaa5621b142d8e43c22354041b Merge branch 'ap/remote-hg-unquote-cquote' 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 --- 583736c0bcf09adaa5621b142d8e43c22354041b diff --cc contrib/remote-helpers/git-remote-hg index 92d994e470,85abbedb1c..3222afd9da --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@@ -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]