diff mercurial/discovery.py @ 51399: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 f95ab2c53303
children b70628a9aa7e
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: