changeset 40781:e115a6452b41

match: use _BASE_SIZE instead of magic value 4 Differential Revision: https://phab.mercurial-scm.org/D5351
author Martin von Zweigbergk <martinvonz@google.com>
date Sun, 02 Dec 2018 13:45:20 -0800
parents 1e019f45fa88
children 3984409e144b
files mercurial/match.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: