look for 'text' and 'binary' files.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
This commit is contained in:
@ -697,7 +697,8 @@ class P4Sync(Command):
|
|||||||
stat = filedata[j]
|
stat = filedata[j]
|
||||||
j += 1
|
j += 1
|
||||||
text = ''
|
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']
|
text += filedata[j]['data']
|
||||||
j += 1
|
j += 1
|
||||||
|
|
||||||
@ -773,7 +774,7 @@ class P4Sync(Command):
|
|||||||
if self.isWindows and file["type"].endswith("text"):
|
if self.isWindows and file["type"].endswith("text"):
|
||||||
data = data.replace("\r\n", "\n")
|
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 %s\n" % len(data))
|
||||||
self.gitStream.write(data)
|
self.gitStream.write(data)
|
||||||
self.gitStream.write("\n")
|
self.gitStream.write("\n")
|
||||||
|
Reference in New Issue
Block a user