phases: drop set building in `hasnonpublicphases`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 21 Feb 2024 13:01:25 +0100
changeset 51416 0c04074f5414
parent 51415 1df8d84e7c99
child 51417 e0d329491709
phases: drop set building in `hasnonpublicphases` We don't actually use the set, so why do we ensure they are built? (we should also clean up the use of repository argument but that's a quest for later).
mercurial/phases.py
--- a/mercurial/phases.py	Wed Feb 21 11:59:28 2024 +0100
+++ b/mercurial/phases.py	Wed Feb 21 13:01:25 2024 +0100
@@ -382,8 +382,7 @@
 
     def hasnonpublicphases(self, repo: "localrepo.localrepository") -> bool:
         """detect if there are revisions with non-public phase"""
-        repo = repo.unfiltered()
-        self._ensure_phase_sets(repo)
+        # XXX deprecate the unused repo argument
         return any(
             revs for phase, revs in self._phaseroots.items() if phase != public
         )