Antoine Pelisse f7aa491f81 remote-hg: unquote C-style paths when exporting
git-fast-import documentation says that paths can be C-style quoted.
Unfortunately, the current remote-hg helper doesn't unquote quoted
path and pass them as-is to Mercurial when the commit is created.

This results in the following situation:

 - clone a mercurial repository with git
 - add a file with space in a directory: `>dir/foo\ bar`
 - commit that new file, and push the change to mercurial
 - the mercurial repository now has a new directory named '"dir',
   which contains a file named 'foo bar"'

Use Python str.decode('string-escape') to unquote the string if it
starts and ends with ".  It has been tested with quotes, spaces, and
utf-8 encoded file-names.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-09 08:26:13 -05:00
2014-05-09 08:26:03 -05:00
2014-05-09 08:25:22 -05:00
2014-05-09 08:26:03 -05:00
Description
Transparent bidirectional bridge between Git and Mercurial for Git
GPL-2.0 943 KiB
Languages
Python 54.9%
Shell 42.3%
Ruby 1.9%
Makefile 0.9%