diff mercurial/util.py @ 1454:f4250806dbeb

further fix traceback on invalid .hgignore patterns Please apply this little fix (matchfn return None if no patterns are specified).
author Benoit Boissinot <mercurial-bugs@selenic.com>
date Wed, 26 Oct 2005 16:10:56 -0700
parents 4babaa52badf
children 1a3c6689ef2b
line wrap: on
line diff
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -246,6 +246,8 @@ def _matcher(canonroot, cwd, names, inc,
 
     def matchfn(pats, tail):
         """build a matching function from a set of patterns"""
+        if not pats:
+            return
         matches = []
         for k, p in pats:
             try: