# HG changeset patch # User Joerg Sonnenberger # Date 2020-07-07 19:57:46 # Node ID 6232d732658c3ac6c4d9f6c1e8d9893fd3273c79 # Parent 72feaeb510b3502f14773e5ac2d06862e66012d4 phases: replace magic number by constant Differential Revision: https://phab.mercurial-scm.org/D8695 diff --git a/mercurial/phases.py b/mercurial/phases.py --- a/mercurial/phases.py +++ b/mercurial/phases.py @@ -886,7 +886,7 @@ def newcommitphase(ui): def hassecret(repo): """utility function that check if a repo have any secret changeset.""" - return bool(repo._phasecache.phaseroots[2]) + return bool(repo._phasecache.phaseroots[secret]) def preparehookargs(node, old, new):