changeset 51400:2e10ddbb9faa

phases: check secret presence the right way during discovery There is an official function for this, lets use it. This will prevent the code to break in the future while we refactor the phase code.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 20 Feb 2024 17:17:54 +0100
parents 8f2ea3fa50fd
children 68289ed170c7
files mercurial/discovery.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/discovery.py	Tue Feb 20 14:21:18 2024 +0100
+++ b/mercurial/discovery.py	Tue Feb 20 17:17:54 2024 +0100
@@ -168,7 +168,7 @@
     og.commonheads, _any, _hds = commoninc
 
     # compute outgoing
-    mayexclude = repo._phasecache.phaseroots[phases.secret] or repo.obsstore
+    mayexclude = phases.hassecret(repo) or repo.obsstore
     if not mayexclude:
         og.ancestorsof = onlyheads or repo.heads()
     elif onlyheads is None: