mercurial/match.py
changeset 25362 20ad936ac5d2
parent 25301 caaf4045eca8
child 25433 419ac63fe29c
--- a/mercurial/match.py	Fri May 29 14:24:50 2015 -0700
+++ b/mercurial/match.py	Wed May 27 10:44:04 2015 -0700
@@ -129,8 +129,9 @@
             kindpats = self._normalize(exclude, 'glob', root, cwd, auditor)
             self.excludepat, em = _buildmatch(ctx, kindpats, '(?:/|$)',
                                               listsubrepos, root)
-            self._excluderoots.update(_roots(kindpats))
-            self._excluderoots.discard('.')
+            if not _anypats(kindpats):
+                self._excluderoots.update(_roots(kindpats))
+                self._excluderoots.discard('.')
             matchfns.append(lambda f: not em(f))
         if exact:
             if isinstance(patterns, list):