Patchwork [02,of,10,V2] copies: remove use of manifest.matches

login
register
mail settings
Submitter Durham Goode
Date March 8, 2017, 3:22 a.m.
Message ID <f70310209acbbcb4cf7c.1488943354@dev111.prn1.facebook.com>
Download mbox | patch
Permalink /patch/18980/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Durham Goode - March 8, 2017, 3:22 a.m.
# HG changeset patch
# User Durham Goode <durham@fb.com>
# Date 1488909371 28800
#      Tue Mar 07 09:56:11 2017 -0800
# Node ID f70310209acbbcb4cf7cae7c38d94e15c09c1ace
# Parent  5ede3fa3bae6e964b4bce8b36681d203c05e94f7
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'''