##// END OF EJS Templates
phases: make two functions private for phase computation
Laurent Charignon -
r24599:2a73829e default
parent child Browse files
Show More
@@ -172,14 +172,14 b' class phasecache(object):'
172 for a in 'phaseroots dirty opener _phaserevs'.split():
172 for a in 'phaseroots dirty opener _phaserevs'.split():
173 setattr(self, a, getattr(phcache, a))
173 setattr(self, a, getattr(phcache, a))
174
174
175 def getphaserevsnative(self, repo):
175 def _getphaserevsnative(self, repo):
176 repo = repo.unfiltered()
176 repo = repo.unfiltered()
177 nativeroots = []
177 nativeroots = []
178 for phase in trackedphases:
178 for phase in trackedphases:
179 nativeroots.append(map(repo.changelog.rev, self.phaseroots[phase]))
179 nativeroots.append(map(repo.changelog.rev, self.phaseroots[phase]))
180 return repo.changelog.computephases(nativeroots)
180 return repo.changelog.computephases(nativeroots)
181
181
182 def computephaserevspure(self, repo):
182 def _computephaserevspure(self, repo):
183 repo = repo.unfiltered()
183 repo = repo.unfiltered()
184 revs = [public] * len(repo.changelog)
184 revs = [public] * len(repo.changelog)
185 self._phaserevs = revs
185 self._phaserevs = revs
@@ -197,11 +197,11 b' class phasecache(object):'
197 try:
197 try:
198 if repo.ui.configbool('experimental',
198 if repo.ui.configbool('experimental',
199 'nativephaseskillswitch'):
199 'nativephaseskillswitch'):
200 self.computephaserevspure(repo)
200 self._computephaserevspure(repo)
201 else:
201 else:
202 self._phaserevs = self.getphaserevsnative(repo)
202 self._phaserevs = self._getphaserevsnative(repo)
203 except AttributeError:
203 except AttributeError:
204 self.computephaserevspure(repo)
204 self._computephaserevspure(repo)
205 return self._phaserevs
205 return self._phaserevs
206
206
207 def invalidate(self):
207 def invalidate(self):
General Comments 0
You need to be logged in to leave comments. Login now