##// END OF EJS Templates
obsolete: rename `getobscache` into `getrevs`...
Pierre-Yves David -
r17825:3cc06457 default
parent child Browse files
Show More
@@ -233,15 +233,15 b' class changectx(object):'
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__:
@@ -376,7 +376,7 b' def cachefor(name):'
376 return func
376 return func
377 return decorator
377 return decorator
378
378
379 def getobscache(repo, name):
379 def getrevs(repo, name):
380 """Return the set of revision that belong to the <name> set
380 """Return the set of revision that belong to the <name> set
381
381
382 Such access may compute the set and cache it for future use"""
382 Such access may compute the set and cache it for future use"""
@@ -622,7 +622,7 b' def extinct(repo, subset, x):'
622 """
622 """
623 # i18n: "extinct" is a keyword
623 # i18n: "extinct" is a keyword
624 getargs(x, 0, 0, _("extinct takes no arguments"))
624 getargs(x, 0, 0, _("extinct takes no arguments"))
625 extincts = obsmod.getobscache(repo, 'extinct')
625 extincts = obsmod.getrevs(repo, 'extinct')
626 return [r for r in subset if r in extincts]
626 return [r for r in subset if r in extincts]
627
627
628 def extra(repo, subset, x):
628 def extra(repo, subset, x):
@@ -977,7 +977,7 b' def obsolete(repo, subset, x):'
977 Mutable changeset with a newer version."""
977 Mutable changeset with a newer version."""
978 # i18n: "obsolete" is a keyword
978 # i18n: "obsolete" is a keyword
979 getargs(x, 0, 0, _("obsolete takes no arguments"))
979 getargs(x, 0, 0, _("obsolete takes no arguments"))
980 obsoletes = obsmod.getobscache(repo, 'obsolete')
980 obsoletes = obsmod.getrevs(repo, 'obsolete')
981 return [r for r in subset if r in obsoletes]
981 return [r for r in subset if r in obsoletes]
982
982
983 def origin(repo, subset, x):
983 def origin(repo, subset, x):
@@ -1456,7 +1456,7 b' def unstable(repo, subset, x):'
1456 """
1456 """
1457 # i18n: "unstable" is a keyword
1457 # i18n: "unstable" is a keyword
1458 getargs(x, 0, 0, _("unstable takes no arguments"))
1458 getargs(x, 0, 0, _("unstable takes no arguments"))
1459 unstables = obsmod.getobscache(repo, 'unstable')
1459 unstables = obsmod.getrevs(repo, 'unstable')
1460 return [r for r in subset if r in unstables]
1460 return [r for r in subset if r in unstables]
1461
1461
1462
1462
General Comments 0
You need to be logged in to leave comments. Login now