diff -r 2d6e03a28c31 -r deb851914fd7 hgext/narrow/narrowdirstate.py --- a/hgext/narrow/narrowdirstate.py Sun Jan 21 17:04:42 2018 +0900 +++ b/hgext/narrow/narrowdirstate.py Fri Jan 26 19:48:39 2018 +0900 @@ -23,8 +23,11 @@ def walk(orig, self, match, subrepos, unknown, ignored, full=True, narrowonly=True): if narrowonly: - narrowmatch = repo.narrowmatch() - match = matchmod.intersectmatchers(match, narrowmatch) + # 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) return orig(self, match, subrepos, unknown, ignored, full) extensions.wrapfunction(dirstate.dirstate, 'walk', walk)