# HG changeset patch # User Anton Shestakov # Date 1649372742 -10800 # Node ID a1a9e6e43d4cb90fe81228ba2d1103ff5a8ff026 # Parent 7847e080026384454cba02ce9ac69f10672d3734 topic: drop compatibility with hg 4.6 (f99d64e8a4e4) diff -r 7847e0800263 -r a1a9e6e43d4c hgext3rd/topic/revset.py --- a/hgext3rd/topic/revset.py Fri Apr 08 01:58:12 2022 +0300 +++ b/hgext3rd/topic/revset.py Fri Apr 08 02:05:42 2022 +0300 @@ -7,17 +7,13 @@ util, ) +from mercurial.utils import stringutil + from . import ( destination, stack, ) -try: - from mercurial.utils import stringutil - mkmatcher = stringutil.stringmatcher -except (ImportError, AttributeError): - mkmatcher = util.stringmatcher - revsetpredicate = registrar.revsetpredicate() def getstringstrict(x, err): @@ -46,7 +42,7 @@ # not a string, but another revset pass else: - kind, pattern, matcher = mkmatcher(topic) + kind, pattern, matcher = stringutil.stringmatcher(topic) if topic.startswith(b'literal:') and pattern not in repo.topics: raise error.RepoLookupError(b"topic '%s' does not exist" % pattern)