From patchwork Thu Jun 7 14:11:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [12,of,25,RFC] phase: explicitly exclude secret phase and above From: Boris Feld X-Patchwork-Id: 32006 Message-Id: <08a0b07117c200dda12c.1528380671@Laptop-Boris.lan> To: mercurial-devel@mercurial-scm.org Date: Thu, 07 Jun 2018 16:11:11 +0200 # HG changeset patch # User Boris Feld # Date 1528224472 -7200 # Tue Jun 05 20:47:52 2018 +0200 # Node ID 08a0b07117c200dda12c721bf60bc27e9541feb1 # Parent 76416e99327fc44f049546ad6a39609d9d606081 # EXP-Topic internal-phase # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 08a0b07117c2 phase: explicitly exclude secret phase and above The comment explicitly mention the secret phase so we should as well use that in the code. diff --git a/mercurial/phases.py b/mercurial/phases.py --- a/mercurial/phases.py +++ b/mercurial/phases.py @@ -568,7 +568,7 @@ def subsetphaseheads(repo, subset): headsbyphase = [[] for i in allphases] # No need to keep track of secret phase; any heads in the subset that # are not mentioned are implicitly secret. - for phase in allphases[:-1]: + for phase in allphases[:secret]: revset = "heads(%%ln & %s())" % phasenames[phase] headsbyphase[phase] = [cl.node(r) for r in repo.revs(revset, subset)] return headsbyphase