##// END OF EJS Templates
patch: differentiate start of file with diff --git vs '--- '
Benoit Boissinot -
r10747:b010d899 stable
parent child Browse files
Show More
@@ -1019,7 +1019,7 b' def iterhunks(ui, fp, sourcefile=None):'
1019 gitworkdone = False
1019 gitworkdone = False
1020
1020
1021 while True:
1021 while True:
1022 newfile = False
1022 newfile = newgitfile = False
1023 x = lr.readline()
1023 x = lr.readline()
1024 if not x:
1024 if not x:
1025 break
1025 break
@@ -1070,7 +1070,7 b' def iterhunks(ui, fp, sourcefile=None):'
1070 if gp and gp.op in ('COPY', 'DELETE', 'RENAME', 'ADD'):
1070 if gp and gp.op in ('COPY', 'DELETE', 'RENAME', 'ADD'):
1071 afile = bfile
1071 afile = bfile
1072 gitworkdone = True
1072 gitworkdone = True
1073 newfile = True
1073 newgitfile = True
1074 elif x.startswith('---'):
1074 elif x.startswith('---'):
1075 # check for a unified diff
1075 # check for a unified diff
1076 l2 = lr.readline()
1076 l2 = lr.readline()
@@ -1097,7 +1097,7 b' def iterhunks(ui, fp, sourcefile=None):'
1097 afile = parsefilename(x)
1097 afile = parsefilename(x)
1098 bfile = parsefilename(l2)
1098 bfile = parsefilename(l2)
1099
1099
1100 if newfile:
1100 if newgitfile or newfile:
1101 emitfile = True
1101 emitfile = True
1102 state = BFILE
1102 state = BFILE
1103 hunknum = 0
1103 hunknum = 0
General Comments 0
You need to be logged in to leave comments. Login now