Mercurial > hg
changeset 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 | 221c9c3146eb |
children | 46e1a4e24225 |
files | mercurial/context.py mercurial/obsolete.py mercurial/revset.py |
diffstat | 3 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Sun Oct 14 15:10:13 2012 -0400 +++ b/mercurial/context.py Fri Oct 19 00:28:13 2012 +0200 @@ -233,15 +233,15 @@ def obsolete(self): """True if the changeset is obsolete""" - return self.rev() in obsmod.getobscache(self._repo, 'obsolete') + return self.rev() in obsmod.getrevs(self._repo, 'obsolete') def extinct(self): """True if the changeset is extinct""" - return self.rev() in obsmod.getobscache(self._repo, 'extinct') + return self.rev() in obsmod.getrevs(self._repo, 'extinct') def unstable(self): """True if the changeset is not obsolete but it's ancestor are""" - return self.rev() in obsmod.getobscache(self._repo, 'unstable') + return self.rev() in obsmod.getrevs(self._repo, 'unstable') def _fileinfo(self, path): if '_manifest' in self.__dict__:
--- a/mercurial/obsolete.py Sun Oct 14 15:10:13 2012 -0400 +++ b/mercurial/obsolete.py Fri Oct 19 00:28:13 2012 +0200 @@ -376,7 +376,7 @@ return func return decorator -def getobscache(repo, name): +def getrevs(repo, name): """Return the set of revision that belong to the <name> set Such access may compute the set and cache it for future use"""
--- a/mercurial/revset.py Sun Oct 14 15:10:13 2012 -0400 +++ b/mercurial/revset.py Fri Oct 19 00:28:13 2012 +0200 @@ -622,7 +622,7 @@ """ # i18n: "extinct" is a keyword getargs(x, 0, 0, _("extinct takes no arguments")) - extincts = obsmod.getobscache(repo, 'extinct') + extincts = obsmod.getrevs(repo, 'extinct') return [r for r in subset if r in extincts] def extra(repo, subset, x): @@ -977,7 +977,7 @@ Mutable changeset with a newer version.""" # i18n: "obsolete" is a keyword getargs(x, 0, 0, _("obsolete takes no arguments")) - obsoletes = obsmod.getobscache(repo, 'obsolete') + obsoletes = obsmod.getrevs(repo, 'obsolete') return [r for r in subset if r in obsoletes] def origin(repo, subset, x): @@ -1456,7 +1456,7 @@ """ # i18n: "unstable" is a keyword getargs(x, 0, 0, _("unstable takes no arguments")) - unstables = obsmod.getobscache(repo, 'unstable') + unstables = obsmod.getrevs(repo, 'unstable') return [r for r in subset if r in unstables]