Fix ignore regression.
authorBryan O'Sullivan <bos@serpentine.com>
Sat, 17 Sep 2005 00:37:14 -0700
changeset 1271 9ab14ca22e37
parent 1270 fc3b41570082
child 1272 060c08bf9e2f
Fix ignore regression. An empty or non-existent hgignore file must return False (don't ignore) for everything.
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Sat Sep 17 00:27:27 2005 -0700
+++ b/mercurial/dirstate.py	Sat Sep 17 00:37:14 2005 -0700
@@ -84,8 +84,12 @@
         if self.blockignore:
             return False
         if not self.ignorefunc:
-            files, self.ignorefunc, anypats = util.matcher(self.root,
-                                                           inc=self.hgignore())
+            ignore = self.hgignore()
+            if ignore:
+                files, self.ignorefunc, anypats = util.matcher(self.root,
+                                                               inc=ignore)
+            else:
+                self.ignorefunc = util.never
         return self.ignorefunc(fn)
 
     def __del__(self):