D4897: status: intersect matcher with narrow matcher instead of filtering afterwards

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Sat Oct 6 01:07:53 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG48a0ce67d67a: status: intersect matcher with narrow matcher instead of filtering afterwards (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4897?vs=11721&id=11735

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -343,7 +343,7 @@
             reversed = True
             ctx1, ctx2 = ctx2, ctx1
 
-        match = match or matchmod.always(self._repo.root, self._repo.getcwd())
+        match = self._repo.narrowmatch(match)
         match = ctx2._matchstatus(ctx1, match)
         r = scmutil.status([], [], [], [], [], [], [])
         r = ctx2._buildstatus(ctx1, r, match, listignored, listclean,
@@ -371,10 +371,6 @@
                 for rfiles, sfiles in zip(r, s):
                     rfiles.extend("%s/%s" % (subpath, f) for f in sfiles)
 
-        narrowmatch = self._repo.narrowmatch()
-        if not narrowmatch.always():
-            for l in r:
-                l[:] = list(filter(narrowmatch, l))
         for l in r:
             l.sort()
 



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


More information about the Mercurial-devel mailing list