mercurial/context.py
changeset 40084 2cf18f46a1ce
parent 40083 48a0ce67d67a
child 40085 aa41f1b01f31
--- a/mercurial/context.py	Thu Sep 27 23:01:26 2018 -0700
+++ b/mercurial/context.py	Fri Sep 28 17:09:15 2018 -0700
@@ -542,7 +542,7 @@
                 return
             match.bad(fn, _('no such file in rev %s') % self)
 
-        m = matchmod.badmatch(match, bad)
+        m = matchmod.badmatch(self._repo.narrowmatch(match), bad)
         return self._manifest.walk(m)
 
     def matches(self, match):
@@ -1168,7 +1168,7 @@
 
     def walk(self, match):
         '''Generates matching file names.'''
-        return sorted(self._repo.dirstate.walk(match,
+        return sorted(self._repo.dirstate.walk(self._repo.narrowmatch(match),
                                                subrepos=sorted(self.substate),
                                                unknown=True, ignored=False))