[PATCH 2 of 6] copies: remove use of manifest.matches

Durham Goode durham at fb.com
Fri Mar 3 14:34:17 EST 2017


# HG changeset patch
# User Durham Goode <durham at fb.com>
# Date 1488519862 28800
#      Thu Mar 02 21:44:22 2017 -0800
# Node ID 4cebdd029399cf7c3b0fff73faf1f41af0e895d1
# Parent  e2ec7a1c68da7209233489a5c05efc5728463632
copies: remove use of manifest.matches

Convert the existing use of manifest.matches to use the new api. This is part
of getting rid of manifest.matches, since it is O(manifest).

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -149,10 +149,7 @@ def _computeforwardmissing(a, b, match=N
     """
     ma = a.manifest()
     mb = b.manifest()
-    if match:
-        ma = ma.matches(match)
-        mb = mb.matches(match)
-    return mb.filesnotin(ma)
+    return mb.filesnotin(ma, match=match)
 
 def _forwardcopies(a, b, match=None):
     '''find {dst at b: src at a} copy mapping where a is an ancestor of b'''


More information about the Mercurial-devel mailing list