revset: include all non-public phases in _notpublic
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 07 Mar 2023 04:50:29 +0100
changeset 50306 92f71d40fc1d
parent 50305 db6d210e9618
child 50307 3cde8ed567d3
revset: include all non-public phases in _notpublic We forgot up to update this when new phases were added.
mercurial/phases.py
mercurial/revset.py
--- a/mercurial/phases.py	Thu Mar 02 04:11:29 2023 +0100
+++ b/mercurial/phases.py	Tue Mar 07 04:50:29 2023 +0100
@@ -154,6 +154,7 @@
 internal = 96  # non-continuous for compatibility
 allphases = (public, draft, secret, archived, internal)
 trackedphases = (draft, secret, archived, internal)
+not_public_phases = trackedphases
 # record phase names
 cmdphasenames = [b'public', b'draft', b'secret']  # known to `hg phase` command
 phasenames = dict(enumerate(cmdphasenames))
--- a/mercurial/revset.py	Thu Mar 02 04:11:29 2023 +0100
+++ b/mercurial/revset.py	Tue Mar 07 04:50:29 2023 +0100
@@ -2061,7 +2061,7 @@
 @predicate(b'_notpublic', safe=True)
 def _notpublic(repo, subset, x):
     getargs(x, 0, 0, b"_notpublic takes no arguments")
-    return _phase(repo, subset, phases.draft, phases.secret)
+    return _phase(repo, subset, *phases.not_public_phases)
 
 
 # for internal use