author | Boris Feld <boris.feld@octobus.net> |
Thu, 22 Nov 2018 17:41:10 +0100 | |
changeset 40812 | 69bd3176da7c |
parent 40811 | 3c842749debc |
child 40813 | e8c992d56465 |
--- a/mercurial/match.py Thu Nov 22 21:02:02 2018 +0100 +++ b/mercurial/match.py Thu Nov 22 17:41:10 2018 +0100 @@ -1201,7 +1201,7 @@ ... ], '$') Traceback (most recent call last): ... - OverflowError + Abort: matcher pattern is too long (20009 bytes) """ try: allgroups = [] @@ -1213,7 +1213,8 @@ for idx, r in enumerate(regexps): piecesize = len(r) if (piecesize + 4) > MAX_RE_SIZE: - raise OverflowError + msg = _("matcher pattern is too long (%d bytes)") % piecesize + raise error.Abort(msg) elif (groupsize + 1 + piecesize) > MAX_RE_SIZE: group = regexps[startidx:idx] allgroups.append(_joinregexes(group))