Skip to content
Snippets Groups Projects
Commit d89045a66e01 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

phase: rename getphaserevs to loadphaserevs

This function is:
- already loading the data in place,
- used once in the code.

So we drop the return value and change the name to make this obvious. We keep
the function public because we'll have to use it in revset.
parent 37876ca00c0a
No related branches found
No related tags found
No related merge requests found
......@@ -194,7 +194,8 @@
for rev in repo.changelog.descendants(roots):
revs[rev] = phase
def getphaserevs(self, repo):
def loadphaserevs(self, repo):
"""ensure phase information is loaded in the object"""
if self._phaserevs is None:
try:
if repo.ui.configbool('experimental',
......@@ -205,7 +206,6 @@
self._phaserevs, self._phasesets = res
except AttributeError:
self._computephaserevspure(repo)
return self._phaserevs
def invalidate(self):
self._phaserevs = None
......@@ -233,7 +233,7 @@
raise ValueError(_('cannot lookup negative revision'))
if self._phaserevs is None or rev >= len(self._phaserevs):
self.invalidate()
self._phaserevs = self.getphaserevs(repo)
self.loadphaserevs(repo)
return self._phaserevs[rev]
def write(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment