mercurial/copies.py
changeset 42485 4c39c99d9492
parent 42373 f3d06d37e194
child 42486 35d674a3d5db
--- a/mercurial/copies.py	Sat Jun 15 10:58:53 2019 +0900
+++ b/mercurial/copies.py	Thu Apr 18 00:40:53 2019 -0700
@@ -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