changeset 1271:9ab14ca22e37

Fix ignore regression. An empty or non-existent hgignore file must return False (don't ignore) for everything.
author Bryan O'Sullivan <bos@serpentine.com>
date Sat, 17 Sep 2005 00:37:14 -0700
parents fc3b41570082
children 060c08bf9e2f
files mercurial/dirstate.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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):