# HG changeset patch # User mpm@selenic.com # Date 1115175112 28800 # Node ID b4d0c3786ad3e47beacf8412157326a32b6d25a4 # Parent e5a480dadca3e787276a0657997d65b9fbedfbee Ignore empty ignore patterns diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -269,7 +269,8 @@ class repository: 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