comparison mercurial/phases.py @ 51416:0c04074f5414

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).
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 21 Feb 2024 13:01:25 +0100
parents 1df8d84e7c99
children e0d329491709
comparison
equal deleted inserted replaced
51415:1df8d84e7c99 51416:0c04074f5414
380 self._loadedrevslen = 0 380 self._loadedrevslen = 0
381 self._phasesets: PhaseSets = None 381 self._phasesets: PhaseSets = None
382 382
383 def hasnonpublicphases(self, repo: "localrepo.localrepository") -> bool: 383 def hasnonpublicphases(self, repo: "localrepo.localrepository") -> bool:
384 """detect if there are revisions with non-public phase""" 384 """detect if there are revisions with non-public phase"""
385 repo = repo.unfiltered() 385 # XXX deprecate the unused repo argument
386 self._ensure_phase_sets(repo)
387 return any( 386 return any(
388 revs for phase, revs in self._phaseroots.items() if phase != public 387 revs for phase, revs in self._phaseroots.items() if phase != public
389 ) 388 )
390 389
391 def nonpublicphaseroots( 390 def nonpublicphaseroots(