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

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Oct 16 15:48:10 CDT 2012


# 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

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')
+
     def _fileinfo(self, path):
         if '_manifest' in self.__dict__:
             try:


More information about the Mercurial-devel mailing list