mercurial/match.py
changeset 21909 335bb8b80443
parent 21815 a4b67bf1f0a5
child 21915 d516b6de3821
equal deleted inserted replaced
21908:cad9dadc9d26 21909:335bb8b80443
    10 from i18n import _
    10 from i18n import _
    11 
    11 
    12 def _rematcher(regex):
    12 def _rematcher(regex):
    13     '''compile the regexp with the best available regexp engine and return a
    13     '''compile the regexp with the best available regexp engine and return a
    14     matcher function'''
    14     matcher function'''
    15     m = util.compilere(regex)
    15     m = util.re.compile(regex)
    16     try:
    16     try:
    17         # slightly faster, provided by facebook's re2 bindings
    17         # slightly faster, provided by facebook's re2 bindings
    18         return m.test_match
    18         return m.test_match
    19     except AttributeError:
    19     except AttributeError:
    20         return m.match
    20         return m.match