summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorDaniel Levin <dendy.ua@gmail.com>2020-12-23 14:37:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-12-23 21:49:40 (GMT)
commit52fc4f195c93eb2b1d1edfae69079646d8c2ea99 (patch)
tree334b1c322abb74199ec944f0d5d1938d94faba46 /git-p4.py
parent898f80736c75878acc02dc55672317fcc0e0a5a6 (diff)
downloadgit-52fc4f195c93eb2b1d1edfae69079646d8c2ea99.zip
git-52fc4f195c93eb2b1d1edfae69079646d8c2ea99.tar.gz
git-52fc4f195c93eb2b1d1edfae69079646d8c2ea99.tar.bz2
git-p4: fix syncing file types with pattern
Example of pattern file type: text+k Text filtered through the p4 pattern regexp must be converted from string back to bytes, otherwise 'data' command for the fast-import will receive extra invalid characters, followed by the fast-import process error. CC: Yang Zhao <yang.zhao@skyboxlabs.com> Signed-off-by: Daniel Levin <dendy.ua@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-p4.py b/git-p4.py
index 4433ca5..90b02f6 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -3031,7 +3031,7 @@ class P4Sync(Command, P4UserMap):
regexp = re.compile(pattern, re.VERBOSE)
text = ''.join(decode_text_stream(c) for c in contents)
text = regexp.sub(r'$\1$', text)
- contents = [ text ]
+ contents = [ encode_text_stream(text) ]
if self.largeFileSystem:
(git_mode, contents) = self.largeFileSystem.processContent(git_mode, relPath, contents)