mercurial/util.py
branchstable
changeset 46372 ebc6d3484fdd
parent 46114 59fa3890d40a
child 46422 112826b59476
child 46714 6f4a481f182a
equal deleted inserted replaced
46371:b910be772eb9 46372:ebc6d3484fdd
  2168 class _re(object):
  2168 class _re(object):
  2169     def _checkre2(self):
  2169     def _checkre2(self):
  2170         global _re2
  2170         global _re2
  2171         try:
  2171         try:
  2172             # check if match works, see issue3964
  2172             # check if match works, see issue3964
  2173             _re2 = bool(re2.match(r'\[([^\[]+)\]', b'[ui]'))
  2173             _re2 = bool(re2.match(br'\[([^\[]+)\]', b'[ui]'))
  2174         except ImportError:
  2174         except ImportError:
  2175             _re2 = False
  2175             _re2 = False
  2176 
  2176 
  2177     def compile(self, pat, flags=0):
  2177     def compile(self, pat, flags=0):
  2178         """Compile a regular expression, using re2 if possible
  2178         """Compile a regular expression, using re2 if possible