mercurial/util.py
changeset 19461 dd7c992d3cc1
parent 19287 8b04e1344111
child 19710 887ffa22fd0d
child 19845 a1237a4b437d
--- a/mercurial/util.py	Thu Jul 18 23:22:59 2013 -0500
+++ b/mercurial/util.py	Mon Jul 01 06:50:58 2013 +0200
@@ -673,8 +673,8 @@
     global _re2
     if _re2 is None:
         try:
-            re2.compile
-            _re2 = True
+            # check if match works, see issue3964
+            _re2 = bool(re2.match(r'\[([^\[]+)\]', '[ui]'))
         except ImportError:
             _re2 = False
     if _re2 and (flags & ~(re.IGNORECASE | re.MULTILINE)) == 0: