Mercurial > hg
changeset 14017:19a7b48446e3
patch: remove redundant variable in iterhunks()
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 26 Apr 2011 21:22:14 +0200 |
parents | bd738875943a |
children | 7ba2c728cf32 |
files | mercurial/patch.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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