phases: fix an overzealous invalidation of the phase sets
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 21 Feb 2024 12:01:09 +0100
changeset 51412 89b638afeb07
parent 51411 774e4eff6e47
child 51413 8fc92193a2cf
phases: fix an overzealous invalidation of the phase sets If `len(cl) == self._loadedrevslen` the cache is up to date.
mercurial/phases.py
--- a/mercurial/phases.py	Wed Feb 21 11:04:56 2024 +0100
+++ b/mercurial/phases.py	Wed Feb 21 12:01:09 2024 +0100
@@ -384,7 +384,7 @@
         """detect if there are revisions with non-public phase"""
         repo = repo.unfiltered()
         cl = repo.changelog
-        if len(cl) >= self._loadedrevslen:
+        if len(cl) > self._loadedrevslen:
             self.invalidate()
             self.loadphaserevs(repo)
         return any(
@@ -401,7 +401,7 @@
         """
         repo = repo.unfiltered()
         cl = repo.changelog
-        if len(cl) >= self._loadedrevslen:
+        if len(cl) > self._loadedrevslen:
             self.invalidate()
             self.loadphaserevs(repo)
         return set().union(