Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 4879:da8640113b5a
Merge with -stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 14 Jul 2007 13:34:40 -0500 |
parents | 192cd95c2ba8 242026115e6a |
children | 2d545b98a7bc |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Jul 12 10:55:49 2007 -0400 +++ b/mercurial/commands.py Sat Jul 14 13:34:40 2007 -0500 @@ -1107,7 +1107,11 @@ reflags = 0 if opts['ignore_case']: reflags |= re.I - regexp = re.compile(pattern, reflags) + try: + regexp = re.compile(pattern, reflags) + except Exception, inst: + ui.warn(_("grep: invalid match pattern: %s!\n") % inst) + return None sep, eol = ':', '\n' if opts['print0']: sep = eol = '\0'