Patchwork D8695: phases: replace magic number by constant

login
register
mail settings
Submitter phabricator
Date July 7, 2020, 10:38 p.m.
Message ID <differential-rev-PHID-DREV-tmdx5qxe7txtqngcepc4-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46648/
State Superseded
Headers show

Comments

phabricator - July 7, 2020, 10:38 p.m.
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8695

AFFECTED FILES
  mercurial/phases.py

CHANGE DETAILS




To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -908,7 +908,7 @@ 
 
 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):