# HG changeset patch # User Augie Fackler # Date 1444838951 14400 # Node ID 558dd43b599d6858f0f298caa698742490069c2c # Parent 70d1191fceedc28483cdcabf8f6b8729133a4368 topic: work around stringmatcher moving during development of hg 3.6 diff -r 70d1191fceed -r 558dd43b599d src/topic/revset.py --- a/src/topic/revset.py Wed Sep 30 18:06:42 2015 -0400 +++ b/src/topic/revset.py Wed Oct 14 12:09:11 2015 -0400 @@ -1,7 +1,14 @@ from mercurial import revset +from mercurial import util from . import constants +try: + mkmatcher = revset._stringmatcher +except AttributeError: + mkmatcher = util.stringmatcher + + def topicset(repo, subset, x): """`topic([topic])` Specified topic or all changes with any topic specified. @@ -17,7 +24,7 @@ topic = revset.getstring(args[0], 'topic() argument must be a string') if topic == '.': topic = repo['.'].extra().get('topic', '') - _kind, _pattern, matcher = revset._stringmatcher(topic) + _kind, _pattern, matcher = mkmatcher(topic) else: matcher = lambda t: bool(t) drafts = subset.filter(lambda r: repo[r].mutable())