changeset 3613:bf583a8dc637

compat: search for stringmatcher in the new location More of util has been split into sub modules.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 29 Mar 2018 18:34:32 +0200
parents 33b718191bc9
children 9ad461df4d4d
files hgext3rd/topic/revset.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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()