diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-04-05 21:49:23 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-07 00:39:28 -0700 |
commit | 6ff8d4e7487c0f48e568b7fd95fa02515a426c1a (patch) | |
tree | 9ef7099be33378d91441508844ec108d36dc2b16 /contrib/remote-helpers/git-remote-bzr | |
parent | remote-bzr: add utf-8 support for fetching (diff) | |
download | tgif-6ff8d4e7487c0f48e568b7fd95fa02515a426c1a.tar.xz |
remote-bzr: add utf-8 support for pushing
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers/git-remote-bzr')
-rwxr-xr-x | contrib/remote-helpers/git-remote-bzr | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index 0bd0759d7f..fad4a48cdc 100755 --- a/contrib/remote-helpers/git-remote-bzr +++ b/contrib/remote-helpers/git-remote-bzr @@ -512,6 +512,11 @@ class CustomTree(): def get_symlink_target(self, file_id): return self.updates[file_id]['data'] +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, bmarks, parsed_refs global mode @@ -551,6 +556,7 @@ def parse_commit(parser): f = { 'deleted' : True } else: die('Unknown file command: %s' % line) + path = c_style_unescape(path).decode('utf-8') files[path] = f repo = parser.repo |