[PATCH 4 of 5] obsolete: add a divergent method on context

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Nov 9 19:23:47 CST 2012


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1352510078 -3600
# Node ID 5d1110a633901e68a2b526fc3df283f97424fa8f
# Parent  135802bc01b47fc34154dd41a698b18fb882c83a
obsolete: add a divergent method on context

The same we have `unstable` and `bumped`. Convenient method to access troubles
information in general may land later.

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -250,6 +250,13 @@
         """
         return self.rev() in obsmod.getrevs(self._repo, 'bumped')
 
+    def divergent(self):
+        """Is a successors of a changeset with multiple possible successors set
+
+        Only non-public and non-obsolete changesets may be divergent.
+        """
+        return self.rev() in obsmod.getrevs(self._repo, 'divergent')
+
     def _fileinfo(self, path):
         if '_manifest' in self.__dict__:
             try:


More information about the Mercurial-devel mailing list