changeset 1611:301d5cd4abc6

make invalid pattern message not confusing.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Mon, 02 Jan 2006 15:52:56 -0800
parents 84e9b3484ff6
children 0d36e3d7e2ea
files mercurial/util.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Mon Jan 02 15:48:16 2006 -0800
+++ b/mercurial/util.py	Mon Jan 02 15:52:56 2006 -0800
@@ -262,8 +262,8 @@
                 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: