changeset 51406:330d74750668

phases: fast path public phase advance when everything is public Everything is already public, so we have nothing to do here.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 22 Feb 2024 15:49:21 +0100
parents 71ae6fee2b9d
children 2f39c7aeb549
files mercurial/phases.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/phases.py	Wed Feb 21 15:24:22 2024 +0100
+++ b/mercurial/phases.py	Thu Feb 22 15:49:21 2024 +0100
@@ -597,6 +597,8 @@
 
         Returns a set of revs whose phase is changed or should be changed
         """
+        if targetphase == public and not self.hasnonpublicphases(repo):
+            return set()
         # Be careful to preserve shallow-copied values: do not update
         # phaseroots values, replace them.
         if revs is None: