Patchwork D6419: copies: do full filtering at end of _changesetforwardcopies()

login
register
mail settings
Submitter phabricator
Date June 17, 2019, 5:33 p.m.
Message ID <3a70361d3a753f6101ea04216c5eae9a@localhost.localdomain>
Download mbox | patch
Permalink /patch/40550/
State Not Applicable
Headers show

Comments

phabricator - June 17, 2019, 5:33 p.m.
Closed by commit rHG4c39c99d9492: copies: do full filtering at end of _changesetforwardcopies() (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6419?vs=15217&id=15543

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6419/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6419

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -300,6 +300,7 @@ 
         else:
             copies = copies1
         if r == b.rev():
+            _filter(a, b, copies)
             return copies
         for c in children[r]:
             childctx = repo[c]
@@ -313,7 +314,10 @@ 
             if not match.always():
                 childcopies = {dst: src for dst, src in childcopies.items()
                                if match(dst)}
-            childcopies = _chainandfilter(a, childctx, copies, childcopies)
+            childcopies = _chain(copies, childcopies)
+            for f in childctx.filesremoved():
+                if f in childcopies:
+                    del childcopies[f]
             heapq.heappush(work, (c, parent, childcopies))
     assert False