changeset 18072:03604f46d48a

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. This get actual use and testing in the next changesets.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Wed, 12 Dec 2012 03:20:49 +0100
parents bea754715961
children e411fd79ca69
files mercurial/context.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Wed Dec 12 03:12:55 2012 +0100
+++ b/mercurial/context.py	Wed Dec 12 03:20:49 2012 +0100
@@ -253,6 +253,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: