Commits

Anonymous committed b4d0c37

Ignore empty ignore patterns

  • Participants
  • Parent commits e5a480d
  • Tags 0.4c

Comments (0)

Files changed (1)

File mercurial/hg.py

             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