match: use _BASE_SIZE instead of magic value 4
Differential Revision: https://phab.mercurial-scm.org/D5351
--- a/mercurial/match.py Sun Dec 02 13:44:49 2018 -0800
+++ b/mercurial/match.py Sun Dec 02 13:45:20 2018 -0800
@@ -1212,7 +1212,7 @@
groupsize = _BASE_SIZE
for idx, r in enumerate(regexps):
piecesize = len(r)
- if (piecesize + 4) > MAX_RE_SIZE:
+ if (piecesize + _BASE_SIZE) > MAX_RE_SIZE:
msg = _("matcher pattern is too long (%d bytes)") % piecesize
raise error.Abort(msg)
elif (groupsize + piecesize) > MAX_RE_SIZE: