# HG changeset patch # User Vadim Gelfer # Date 1136245976 28800 # Node ID 301d5cd4abc64dc6c0bf35302733d55eb494cdbb # Parent 84e9b3484ff6ea7d25cbaa1f26cc40afdbc258fd make invalid pattern message not confusing. diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -262,8 +262,8 @@ def _matcher(canonroot, cwd, names, inc, pat = '(?:%s)' % regex(k, p, tail) matches.append(re.compile(pat).match) except re.error: - if src: raise Abort("%s: invalid pattern: %s:%s" % (src, k, p)) - else: raise Abort("invalid pattern: %s:%s" % (k, p)) + if src: raise Abort("%s: invalid pattern (%s): %s" % (src, k, p)) + else: raise Abort("invalid pattern (%s): %s" % (k, p)) def buildfn(text): for m in matches: