changeset 9:b4d0c3786ad3 0.4c

Ignore empty ignore patterns
author mpm@selenic.com
date Tue, 03 May 2005 18:51:52 -0800
parents e5a480dadca3
children e76ed1e480ef
files mercurial/hg.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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