Mercurial > hg
changeset 10467:16c68fd720ab stable
patch: remove useless copy, cleanup
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 14 Feb 2010 17:53:23 +0100 |
parents | d1f209bb9564 |
children | 2250fc372d34 |
files | mercurial/patch.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py Thu Feb 11 11:22:57 2010 -0200 +++ b/mercurial/patch.py Sun Feb 14 17:53:23 2010 +0100 @@ -1435,7 +1435,6 @@ copy = {} if opts.git or opts.upgrade: copy = copies.copies(repo, ctx1, ctx2, repo[nullid])[0] - copy = copy.copy() difffn = lambda opts, losedata: trydiff(repo, revs, ctx1, ctx2, modified, added, removed, copy, getfilectx, opts, losedata) @@ -1517,9 +1516,10 @@ elif f in removed: if opts.git: # have we already reported a copy above? - if f in copy and copy[f] in added and copyto[copy[f]] == f: - dodiff = False - elif f in copyto and copyto[f] in added and copy[copyto[f]] == f: + if ((f in copy and copy[f] in added + and copyto[copy[f]] == f) or + (f in copyto and copyto[f] in added + and copy[copyto[f]] == f)): dodiff = False else: header.append('deleted file mode %s\n' %