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

login
register
mail settings
Submitter Durham Goode
Date March 3, 2017, 7:34 p.m.
Message ID <4cebdd029399cf7c3b0f.1488569657@dev111.prn1.facebook.com>
Download mbox | patch
Permalink /patch/18900/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Durham Goode - March 3, 2017, 7:34 p.m.
# HG changeset patch
# User Durham Goode <durham@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).

Patch

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@b: src@a} copy mapping where a is an ancestor of b'''