--- a/mercurial/patch.py Wed Nov 03 21:10:59 2010 +0100
+++ b/mercurial/patch.py Wed Nov 03 21:11:05 2010 +0100
@@ -995,10 +995,6 @@
BFILE = 1
context = None
lr = linereader(fp)
- # gitworkdone is True if a git operation (copy, rename, ...) was
- # performed already for the current file. Useful when the file
- # section may have no hunk.
- gitworkdone = False
while True:
newfile = newgitfile = False
@@ -1032,7 +1028,6 @@
elif x.startswith('diff --git'):
# check for git diff, scanning the whole patch file if needed
m = gitre.match(x)
- gitworkdone = False
if m:
afile, bfile = m.group(1, 2)
if not git:
@@ -1047,7 +1042,6 @@
if gp and (gp.op in ('COPY', 'DELETE', 'RENAME', 'ADD')
or gp.mode):
afile = bfile
- gitworkdone = True
newgitfile = True
elif x.startswith('---'):
# check for a unified diff
@@ -1075,9 +1069,6 @@
afile = parsefilename(x)
bfile = parsefilename(l2)
- if newfile:
- gitworkdone = False
-
if newgitfile or newfile:
emitfile = True
state = BFILE