Mercurial > public > mercurial-scm > hg
diff mercurial/util.py @ 8566:744d6322b05b
match: change all users of util.matcher to match.match
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 24 May 2009 02:56:14 -0500 |
parents | 22ec9cf4d0ce |
children | 4fa1618bf495 |
line wrap: on
line diff
--- 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):