hgext/narrow/narrowdirstate.py
changeset 40086 41fcdfe3bfeb
parent 39960 1a7d901a0a0c
child 40087 1d09ba0d2ed3
--- a/hgext/narrow/narrowdirstate.py	Fri Sep 28 22:35:05 2018 -0700
+++ b/hgext/narrow/narrowdirstate.py	Mon Oct 01 10:11:00 2018 -0700
@@ -10,7 +10,6 @@
 from mercurial.i18n import _
 from mercurial import (
     error,
-    match as matchmod,
 )
 
 def wrapdirstate(repo, dirstate):
@@ -30,11 +29,7 @@
         def walk(self, match, subrepos, unknown, ignored, full=True,
                  narrowonly=True):
             if narrowonly:
-                # hack to not exclude explicitly-specified paths so that they
-                # can be warned later on e.g. dirstate.add()
-                em = matchmod.exact(match._root, match._cwd, match.files())
-                nm = matchmod.unionmatcher([repo.narrowmatch(), em])
-                match = matchmod.intersectmatchers(match, nm)
+                match = repo.narrowmatch(match, includeexact=True)
             return super(narrowdirstate, self).walk(match, subrepos, unknown,
                                                     ignored, full)