##// END OF EJS Templates
phases: add a cache allowing to know in which phase a changeset is
Pierre-Yves David -
r15420:e80d0d31 default
parent child Browse files
Show More
@@ -174,6 +174,18 b' class localrepository(repo.repository):'
174 174 def _phaseroots(self):
175 175 return phases.readroots(self)
176 176
177 @propertycache
178 def _phaserev(self):
179 cache = [0] * len(self)
180 for phase in phases.trackedphases:
181 roots = map(self.changelog.rev, self._phaseroots[phase])
182 if roots:
183 for rev in roots:
184 cache[rev] = phase
185 for rev in self.changelog.descendants(*roots):
186 cache[rev] = phase
187 return cache
188
177 189 @filecache('00changelog.i', True)
178 190 def changelog(self):
179 191 c = changelog.changelog(self.sopener)
General Comments 0
You need to be logged in to leave comments. Login now