changeset 40086:aa41f1b01f31

narrow: filter files by narrowspec in ctx.matches() This has no effect yet because 1) for committed changes, ctx.matches() just calls ctx.walk(), which we updated in the previous patch, and 2) for the working copy, the filtering is also done in the overridden dirstate.walk() in narrowdirstate. Differential Revision: https://phab.mercurial-scm.org/D4899
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 28 Sep 2018 22:35:05 -0700
parents 2cf18f46a1ce
children 41fcdfe3bfeb
files mercurial/context.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Fri Sep 28 17:09:15 2018 -0700
+++ b/mercurial/context.py	Fri Sep 28 22:35:05 2018 -0700
@@ -1173,6 +1173,7 @@
                                                unknown=True, ignored=False))
 
     def matches(self, match):
+        match = self._repo.narrowmatch(match)
         ds = self._repo.dirstate
         return sorted(f for f in ds.matches(match) if ds[f] != 'r')