Comments
Patch
@@ -361,7 +361,9 @@ def stringmatcher(pattern, casesensitive
flags = remod.I
regex = remod.compile(pattern, flags)
except remod.error as e:
- raise error.ParseError(_(b'invalid regular expression: %s') % e)
+ raise error.ParseError(
+ _(b'invalid regular expression: %s') % forcebytestr(e)
+ )
return kind, pattern, regex.search
elif kind == b'literal':
if casesensitive:
@@ -1448,6 +1448,9 @@ test author
(string '('))
hg: parse error: invalid match pattern: (unbalanced parenthesis|missing \),.*) (re)
[255]
+ $ log 'desc("re:(")'
+ hg: parse error: invalid regular expression: (unbalanced parenthesis|missing \),.*) (re)
+ [255]
$ try 'grep("\bissue\d+")'
(func
(symbol 'grep')