1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-01 14:57:52 +01:00
git/contrib/remote-helpers
Antoine Pelisse 1136265377 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>
2013-10-23 09:45:53 -07:00
..
git-remote-bzr Merge branch 'fc/remote-bzr' 2013-06-11 13:30:26 -07:00
git-remote-hg remote-hg: unquote C-style paths when exporting 2013-10-23 09:45:53 -07:00
Makefile remote-helpers: fix the run of all tests 2013-04-04 09:35:20 -07:00
test-bzr.sh remote-bzr: simplify test checks 2013-05-28 07:59:31 -07:00
test-hg-bidi.sh remote-hg: always point HEAD to master 2013-05-28 07:59:30 -07:00
test-hg-hg-git.sh remote-hg: always point HEAD to master 2013-05-28 07:59:30 -07:00
test-hg.sh remote-hg: add support for --force 2013-05-28 08:02:25 -07:00