mercurial/util.py
changeset 8566 744d6322b05b
parent 8534 22ec9cf4d0ce
child 8568 4fa1618bf495
--- a/mercurial/util.py	Sat May 23 17:04:41 2009 +0200
+++ b/mercurial/util.py	Sun May 24 02:56:14 2009 -0500
@@ -342,7 +342,7 @@
 
         raise Abort('%s not under root' % myname)
 
-def matcher(canonroot, cwd='', names=[], inc=[], exc=[], src=None, dflt_pat='glob'):
+def matcher(canonroot, cwd='', names=[], inc=[], exc=[], dflt_pat='glob'):
     """build a function to match a set of file patterns
 
     arguments:
@@ -352,7 +352,6 @@
     inc - patterns to include
     exc - patterns to exclude
     dflt_pat - if a pattern in names has no explicit type, assume this one
-    src - where these patterns came from (e.g. .hgignore)
 
     a pattern is one of:
     'glob:<glob>' - a glob relative to cwd
@@ -422,11 +421,7 @@
                 try:
                     re.compile('(?:%s)' % regex(k, p, tail))
                 except re.error:
-                    if src:
-                        raise Abort("%s: invalid pattern (%s): %s" %
-                                    (src, k, p))
-                    else:
-                        raise Abort("invalid pattern (%s): %s" % (k, p))
+                    raise Abort("invalid pattern (%s): %s" % (k, p))
             raise Abort("invalid pattern")
 
     def globprefix(pat):