Patchwork D6118: copies: remove dependency on scmutil by directly using match.exact()

login
register
mail settings
Submitter phabricator
Date March 11, 2019, 6:19 p.m.
Message ID <differential-rev-PHID-DREV-urgclbt3etdvltfcl6aq-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39221/
State Superseded
Headers show

Comments

phabricator - March 11, 2019, 6:19 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I want to add a dependency from scmutil.copies(), so I need to remove
  this dependency first.

REPOSITORY
  rHG Mercurial

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

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
@@ -17,7 +17,6 @@ 
     match as matchmod,
     node,
     pathutil,
-    scmutil,
     util,
 )
 from .utils import (
@@ -193,7 +192,7 @@ 
     # this comparison.
     forwardmissingmatch = match
     if b.p1() == a and b.p2().node() == node.nullid:
-        filesmatcher = scmutil.matchfiles(a._repo, b.files())
+        filesmatcher = matchmod.exact(b.files())
         forwardmissingmatch = matchmod.intersectmatchers(match, filesmatcher)
     missing = _computeforwardmissing(a, b, match=forwardmissingmatch)