changeset 12915:df1b65f8b4d4

patch: remove unused gitworkdone variable from iterhunks()
author Patrick Mezard <pmezard@gmail.com>
date Wed, 03 Nov 2010 21:11:05 +0100
parents 27bc21814e9c
children cfedc529e4a1
files mercurial/patch.py
diffstat 1 files changed, 0 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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