[PATCH 6 of 7 V3] context: add a bumped attributes for changectx

Kevin Bullock kbullock+mercurial at ringworld.org
Tue Oct 16 17:09:54 CDT 2012


On Oct 16, 2012, at 3:48 PM, Pierre-Yves David wrote:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at logilab.fr>
> # Date 1350304661 -7200
> # Node ID a3e43e8c10a5970438004bcff6c638d5df622780
> # Parent  fcbf62700727906b6844d9e11abdd741d7151ae5
> context: add a bumped attributes for changectx
                 bumped() method [or predicate] to

> Same as unstable(), returns true if the changeset is bumped.
> 
> diff --git a/mercurial/context.py b/mercurial/context.py
> --- a/mercurial/context.py
> +++ b/mercurial/context.py
> @@ -243,6 +243,13 @@
>         """True if the changeset is not obsolete but it's ancestor are"""
>         return self.rev() in obsmod.getobscache(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.getobscache(self._repo, 'bumped')

Still seems like we should have a self-contained method for this that doesn't take arguments.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list