[PATCH 6 of 7] context: add a `bumped` attributes for changectx
pierre-yves.david at logilab.fr
pierre-yves.david at logilab.fr
Wed Oct 3 05:13:06 CDT 2012
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1348842063 -7200
# Node ID 0fa428945d3068e04ca11c07a395974c30048a13
# Parent ef9cf2b04e443423bbcf958663916e5be3fb6d1c
context: add a `bumped` attributes for changectx
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
@@ -241,10 +241,15 @@ class changectx(object):
def unstable(self):
"""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 successors of a public changeset
+ """
+ return self.rev() in obsmod.getobscache(self._repo, 'bumped')
+
def _fileinfo(self, path):
if '_manifest' in self.__dict__:
try:
return self._manifest[path], self._manifest.flags(path)
except KeyError:
More information about the Mercurial-devel
mailing list