comparison mercurial/context.py @ 17825:3cc06457f15e

obsolete: rename `getobscache` into `getrevs` The old name was not very good for two reasons: - caller does not care about "cache", - set of revision returned may not be obsolete at all. The new name was suggested by Kevin Bullock.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 19 Oct 2012 00:28:13 +0200
parents a1c4b21fc1b2
children 82f1fe0308bd
comparison
equal deleted inserted replaced
17824:221c9c3146eb 17825:3cc06457f15e
231 for d in self._repo.changelog.descendants([self._rev]): 231 for d in self._repo.changelog.descendants([self._rev]):
232 yield changectx(self._repo, d) 232 yield changectx(self._repo, d)
233 233
234 def obsolete(self): 234 def obsolete(self):
235 """True if the changeset is obsolete""" 235 """True if the changeset is obsolete"""
236 return self.rev() in obsmod.getobscache(self._repo, 'obsolete') 236 return self.rev() in obsmod.getrevs(self._repo, 'obsolete')
237 237
238 def extinct(self): 238 def extinct(self):
239 """True if the changeset is extinct""" 239 """True if the changeset is extinct"""
240 return self.rev() in obsmod.getobscache(self._repo, 'extinct') 240 return self.rev() in obsmod.getrevs(self._repo, 'extinct')
241 241
242 def unstable(self): 242 def unstable(self):
243 """True if the changeset is not obsolete but it's ancestor are""" 243 """True if the changeset is not obsolete but it's ancestor are"""
244 return self.rev() in obsmod.getobscache(self._repo, 'unstable') 244 return self.rev() in obsmod.getrevs(self._repo, 'unstable')
245 245
246 def _fileinfo(self, path): 246 def _fileinfo(self, path):
247 if '_manifest' in self.__dict__: 247 if '_manifest' in self.__dict__:
248 try: 248 try:
249 return self._manifest[path], self._manifest.flags(path) 249 return self._manifest[path], self._manifest.flags(path)