topic: directly use the '_notpublic' revset
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 02 Jul 2017 14:10:44 +0200
changeset 2692 96843c68acc8
parent 2691 9b68a2083dac
child 2693 f4b0351fa813
topic: directly use the '_notpublic' revset This is just more robust to achieve the same goal.
hgext3rd/topic/revset.py
--- a/hgext3rd/topic/revset.py	Sun Jul 02 13:49:32 2017 +0200
+++ b/hgext3rd/topic/revset.py	Sun Jul 02 14:10:44 2017 +0200
@@ -36,16 +36,7 @@
     else:
         matcher = lambda t: bool(t)
 
-    # XXX-mercurial 4.1 compat
-    # otherwise use:
-    #
-    #   mutable = repo._phasecache.getrevset(repo, (phases.draft, phases.secret))
-    #
-    mutable = set()
-    for u in repo._phasecache._phasesets[1:]:
-        mutable.update(u)
-    mutable = revset.baseset(mutable - repo.changelog.filteredrevs)
-    mutable.sort()
+    mutable = revset._notpublic(repo, revset.fullreposet(repo), ())
 
     rawchange = repo.changelog.changelogrevision
     key = constants.extrakey