--- a/hgext3rd/topic/revset.py Thu Jun 22 09:46:30 2017 +0200
+++ b/hgext3rd/topic/revset.py Thu Jun 22 09:41:01 2017 +0200
@@ -39,9 +39,16 @@
else:
matcher = lambda t: bool(t)
mutable = repo._phasecache.getrevset(repo, (phases.draft, phases.secret))
- drafts = subset & mutable
- return drafts.filter(
- lambda r: matcher(repo[r].extra().get(constants.extrakey, '')))
+
+ rawchange = repo.changelog.changelogrevision
+ key = constants.extrakey
+
+ def matchtopic(r):
+ topic = rawchange(r).extra.get(key)
+ if topic is None:
+ return False
+ return matcher(topic)
+ return (subset & mutable).filter(matchtopic)
def ngtipset(repo, subset, x):
"""`ngtip([branch])`