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

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon Mar 11 18:19:33 UTC 2019


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

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)
 



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list