Mercurial > hg-stable
changeset 10747:b010d899665e stable
patch: differentiate start of file with diff --git vs '--- '
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sat, 20 Mar 2010 21:16:22 +0100 |
parents | d94832c4a31d |
children | fb06e357e698 |
files | mercurial/patch.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py Fri Mar 19 22:52:38 2010 +0100 +++ b/mercurial/patch.py Sat Mar 20 21:16:22 2010 +0100 @@ -1019,7 +1019,7 @@ gitworkdone = False while True: - newfile = False + newfile = newgitfile = False x = lr.readline() if not x: break @@ -1070,7 +1070,7 @@ if gp and gp.op in ('COPY', 'DELETE', 'RENAME', 'ADD'): afile = bfile gitworkdone = True - newfile = True + newgitfile = True elif x.startswith('---'): # check for a unified diff l2 = lr.readline() @@ -1097,7 +1097,7 @@ afile = parsefilename(x) bfile = parsefilename(l2) - if newfile: + if newgitfile or newfile: emitfile = True state = BFILE hunknum = 0