obsolete: add a divergent method on context
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Wed, 12 Dec 2012 03:20:49 +0100
changeset 18072 03604f46d48a
parent 18071 bea754715961
child 18073 e411fd79ca69
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.
mercurial/context.py
--- 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: