Commit 8b01d1f4 authored by mpm@selenic.com's avatar mpm@selenic.com

Ignore empty ignore patterns

parent e5a480dadca3
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment