# HG changeset patch # User Yuya Nishihara # Date 1528613278 -32400 # Node ID 2d487b9cac0729d5911af6ff02bed86cca3e29ad # Parent 76838305b9dd2ed2d0e9f4feb94ca68c39456b28 match: explode if unsupported pattern passed down to _regex() builder diff -r 76838305b9dd -r 2d487b9cac07 mercurial/match.py --- a/mercurial/match.py Sat Jun 09 21:13:24 2018 +0900 +++ b/mercurial/match.py Sun Jun 10 15:47:58 2018 +0900 @@ -819,7 +819,9 @@ if pat.startswith('^'): return pat return '.*' + pat - return _globre(pat) + globsuffix + if kind == 'glob': + return _globre(pat) + globsuffix + raise error.ProgrammingError('not a regex pattern: %s:%s' % (kind, pat)) def _buildmatch(ctx, kindpats, globsuffix, listsubrepos, root): '''Return regexp string and a matcher function for kindpats.