hgext3rd/topic/revset.py
changeset 2650 db788700ed82
parent 1986 042356d5ba59
child 2651 6a3df2404472
--- a/hgext3rd/topic/revset.py	Wed Jun 21 07:32:11 2017 +0530
+++ b/hgext3rd/topic/revset.py	Thu Jun 22 09:46:30 2017 +0200
@@ -3,6 +3,7 @@
 from mercurial.i18n import _
 from mercurial import (
     error,
+    phases,
     revset,
     util,
 )
@@ -37,7 +38,8 @@
         _kind, _pattern, matcher = mkmatcher(topic)
     else:
         matcher = lambda t: bool(t)
-    drafts = subset.filter(lambda r: repo[r].mutable())
+    mutable = repo._phasecache.getrevset(repo, (phases.draft, phases.secret))
+    drafts = subset & mutable
     return drafts.filter(
         lambda r: matcher(repo[r].extra().get(constants.extrakey, '')))