match: don't remove '.' from _includeroots
This makes _includeroots more like _fileroots and gives visitdir() a
nice symmetry in the two.
I'm hoping to later combine the two (_fileroots and _includeroots),
and having them treated similarly should make that step easier to
follow.
--- a/mercurial/match.py Sun May 31 13:17:41 2015 -0700
+++ b/mercurial/match.py Wed May 27 13:22:48 2015 -0700
@@ -126,7 +126,6 @@
self.includepat, im = _buildmatch(ctx, kindpats, '(?:/|$)',
listsubrepos, root)
self._includeroots.update(_roots(kindpats))
- self._includeroots.discard('.')
self._includedirs.update(util.dirs(self._includeroots))
matchfns.append(im)
if exclude:
@@ -225,6 +224,7 @@
if dir in self._excluderoots:
return False
if (self._includeroots and
+ '.' not in self._includeroots and
dir not in self._includeroots and
dir not in self._includedirs and
not any(parent in self._includeroots