Ignore empty ignore patterns 0.4c
authormpm@selenic.com
Tue, 03 May 2005 18:51:52 -0800
changeset 9 b4d0c3786ad3
parent 8 e5a480dadca3
child 10 e76ed1e480ef
Ignore empty ignore patterns
mercurial/hg.py
--- a/mercurial/hg.py	Tue May 03 18:51:29 2005 -0800
+++ b/mercurial/hg.py	Tue May 03 18:51:52 2005 -0800
@@ -269,7 +269,8 @@
             try:
                 l = open(os.path.join(self.root, ".hgignore")).readlines()
                 for pat in l:
-                    self.ignorelist.append(re.compile(pat[:-1]))
+                    if pat != "\n":
+                        self.ignorelist.append(re.compile(pat[:-1]))
             except IOError: pass
         for pat in self.ignorelist:
             if pat.search(f): return True