提交 7530a40c 编写于 作者: H Han-Wen Nienhuys

look for 'text' and 'binary' files.

Signed-off-by: NHan-Wen Nienhuys <hanwen@google.com>
上级 b1ce9447
......@@ -697,7 +697,8 @@ class P4Sync(Command):
stat = filedata[j]
j += 1
text = ''
while j < len(filedata) and filedata[j]['code'] == 'text':
while j < len(filedata) and filedata[j]['code'] in ('text',
'binary'):
text += filedata[j]['data']
j += 1
......@@ -773,7 +774,7 @@ class P4Sync(Command):
if self.isWindows and file["type"].endswith("text"):
data = data.replace("\r\n", "\n")
self.gitStream.write("M %s inline %s\n" % (mode, relPath))
self.gitStream.write("M %d inline %s\n" % (mode, relPath))
self.gitStream.write("data %s\n" % len(data))
self.gitStream.write(data)
self.gitStream.write("\n")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册