An empty .hgignore file must cause us to ignore nothing, not everything!
authorBryan O'Sullivan <bos@serpentine.com>
Wed, 20 Jul 2005 03:37:01 -0800
changeset 735 3433b228bbb3
parent 734 d4e161d60f61
child 736 1e84f1014f33
An empty .hgignore file must cause us to ignore nothing, not everything!
mercurial/hg.py
--- a/mercurial/hg.py	Wed Jul 20 03:24:54 2005 -0800
+++ b/mercurial/hg.py	Wed Jul 20 03:37:01 2005 -0800
@@ -299,9 +299,12 @@
                             bigpat.append(util.pconvert(pat[:-1]))
             except IOError: pass
 
-            s = "(?:%s)" % (")|(?:".join(bigpat))
-            r = re.compile(s)
-            self.ignorefunc = r.search
+            if bigpat:
+                s = "(?:%s)" % (")|(?:".join(bigpat))
+                r = re.compile(s)
+                self.ignorefunc = r.search
+            else:
+                self.ignorefunc = util.never
 
         return self.ignorefunc(f)