summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Peter van Zetten <peter.van.zetten@cgi.com>2013-04-11 07:23:00 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-04-11 10:46:46 -0700
commit15a8d901dd38cdc10d6b17d718e20e8ba91c66d1 (patch)
tree2d363bc6d048f34f1a9fb9e742fd8b298264d7ed
parentremote-hg: properly report errors on bookmark pushes (diff)
downloadtgif-15a8d901dd38cdc10d6b17d718e20e8ba91c66d1.tar.xz
remote-hg: fix for files with spaces
Set the maximum number of splits to make when dividing the diff stat lines based on space characters. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xcontrib/remote-helpers/git-remote-hg4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index 19eb4dbd9a..c6a1a47cc8 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -578,7 +578,7 @@ def parse_commit(parser):
mark = int(mark_ref[1:])
f = { 'mode' : hgmode(m), 'data' : blob_marks[mark] }
elif parser.check('D'):
- t, path = line.split(' ')
+ t, path = line.split(' ', 1)
f = { 'deleted' : True }
else:
die('Unknown file command: %s' % line)
@@ -625,7 +625,7 @@ def parse_commit(parser):
i = data.find('\n--HG--\n')
if i >= 0:
tmp = data[i + len('\n--HG--\n'):].strip()
- for k, v in [e.split(' : ') for e in tmp.split('\n')]:
+ for k, v in [e.split(' : ', 1) for e in tmp.split('\n')]:
if k == 'rename':
old, new = v.split(' => ', 1)
files[new]['rename'] = old