Mercurial > hg-stable
changeset 17832:82f1fe0308bd
context: add a `bumped` method to `changectx`
Same as `unstable()`, returns true if the changeset is bumped.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Fri, 19 Oct 2012 00:43:44 +0200 |
parents | 70b08df24fef |
children | 0c1185f6ddd7 |
files | mercurial/context.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Fri Oct 19 00:41:53 2012 +0200 +++ b/mercurial/context.py Fri Oct 19 00:43:44 2012 +0200 @@ -243,6 +243,13 @@ """True if the changeset is not obsolete but it's ancestor are""" return self.rev() in obsmod.getrevs(self._repo, 'unstable') + def bumped(self): + """True if the changeset try to be a successor of a public changeset + + Only non-public and non-obsolete changesets may be bumped. + """ + return self.rev() in obsmod.getrevs(self._repo, 'bumped') + def _fileinfo(self, path): if '_manifest' in self.__dict__: try: