mirror of
https://github.com/frej/fast-export.git
synced 2026-03-03 16:50:42 +01:00
look for 'text' and 'binary' files.
This commit is contained in:
5
git-p4
5
git-p4
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user