# HG changeset patch # User Joerg Sonnenberger # Date 2020-07-07 19:57:46 # Node ID 31f111d4bf61c27c79928fe92fa4795f79edd831 # Parent 9c7ff88775922075c323b70de6e16b67b99b98ce 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):