From b3f5aa66c1ad26388f82f25082c40407a93a5f18 Mon Sep 17 00:00:00 2001 From: Pierre-Yves David Date: Fri, 19 Oct 2012 00:43:44 +0200 Subject: [PATCH] context: add a `bumped` method to `changectx` Same as `unstable()`, returns true if the changeset is bumped. --- mercurial/context.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mercurial/context.py b/mercurial/context.py index 843469bede..86e28403bf 100644 --- a/mercurial/context.py +++ b/mercurial/context.py @@ -243,6 +243,13 @@ class changectx(object): """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: