diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -2170,7 +2170,7 @@ 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