# HG changeset patch # User Pierre-Yves David # Date 2021-02-24 14:16:22 # Node ID ebc6d3484fdda802c92e49105520ed58351d1d0a # Parent b910be772eb9bc0b62bd3bc421a2084d3ac72c9f re2: byteify some regex used to get check re2 availability Changeset 687b865b95ad failed to properly byteify this because it was a raw string. This went undetected so far because re2 does not seems to be widely tested. Differential Revision: https://phab.mercurial-scm.org/D10064 diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -2170,7 +2170,7 @@ class _re(object): global _re2 try: # check if match works, see issue3964 - _re2 = bool(re2.match(r'\[([^\[]+)\]', b'[ui]')) + _re2 = bool(re2.match(br'\[([^\[]+)\]', b'[ui]')) except ImportError: _re2 = False