phases: check secret presence the right way during discovery
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 20 Feb 2024 17:17:54 +0100
changeset 51402 2e10ddbb9faa
parent 51401 8f2ea3fa50fd
child 51403 68289ed170c7
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.
mercurial/discovery.py
--- 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: