Don't ignore everything if all hgignore files are empty.
authorThomas Arendsen Hein <thomas@intevation.de>
Sun, 26 Mar 2006 22:32:44 +0200
changeset 2008 11ffa1267185
parent 2007 2ffa36dc3423
child 2009 182f500805db
Don't ignore everything if all hgignore files are empty.
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Sun Mar 26 07:28:52 2006 -0800
+++ b/mercurial/dirstate.py	Sun Mar 26 22:32:44 2006 +0200
@@ -100,10 +100,10 @@
             return False
         if not self.ignorefunc:
             ignore = self.hgignore()
-            if ignore:
+            allpats = []
+            [allpats.extend(patlist) for patlist in ignore.values()]
+            if allpats:
                 try:
-                    allpats = []
-                    [allpats.extend(patlist) for patlist in ignore.values()]
                     files, self.ignorefunc, anypats = (
                         util.matcher(self.root, inc=allpats, src='.hgignore'))
                 except util.Abort: