# HG changeset patch # User Patrick Mezard # Date 1303845734 -7200 # Node ID 19a7b48446e398641d6d5bba341e53b1d106138e # Parent bd738875943a3295c9dec7b8191e93ceb0319c79 patch: remove redundant variable in iterhunks() diff -r bd738875943a -r 19a7b48446e3 mercurial/patch.py --- a/mercurial/patch.py Tue Apr 26 13:13:35 2011 +0200 +++ b/mercurial/patch.py Tue Apr 26 21:22:14 2011 +0200 @@ -1007,7 +1007,7 @@ bfile = "" state = None hunknum = 0 - emitfile = False + emitfile = newfile = False git = False # our states @@ -1016,7 +1016,6 @@ lr = linereader(fp) while True: - newfile = newgitfile = False x = lr.readline() if not x: break @@ -1058,7 +1057,7 @@ if gp and (gp.op in ('COPY', 'DELETE', 'RENAME', 'ADD') or gp.mode): afile = bfile - newgitfile = True + newfile = True elif x.startswith('---'): # check for a unified diff l2 = lr.readline() @@ -1085,7 +1084,8 @@ afile = parsefilename(x) bfile = parsefilename(l2) - if newgitfile or newfile: + if newfile: + newfile = False emitfile = True state = BFILE hunknum = 0