compat: search for stringmatcher in the new location
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 29 Mar 2018 18:34:32 +0200
changeset 3613 bf583a8dc637
parent 3612 33b718191bc9
child 3614 9ad461df4d4d
compat: search for stringmatcher in the new location More of util has been split into sub modules.
hgext3rd/topic/revset.py
--- a/hgext3rd/topic/revset.py	Thu Mar 29 14:13:13 2018 +0200
+++ b/hgext3rd/topic/revset.py	Thu Mar 29 18:34:32 2018 +0200
@@ -15,7 +15,11 @@
 try:
     mkmatcher = revset._stringmatcher
 except AttributeError:
-    mkmatcher = util.stringmatcher
+    try:
+        from mercurial.utils import stringutil
+        mkmatcher = stringutil.stringmatcher
+    except (ImportError, AttributeError):
+        mkmatcher = util.stringmatcher
 
 revsetpredicate = registrar.revsetpredicate()