obsolete: introduce a troubled method on context
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 17 Dec 2012 15:06:15 +0100
changeset 18160 dc526561111c
parent 18159 8019f96ec4ce
child 18161 5b117f82cbdb
obsolete: introduce a troubled method on context Allows to quickly check if a changeset is affected by any troubles. (troubles are: unstable, bumped and divergent)
mercurial/context.py
--- a/mercurial/context.py	Fri Dec 28 14:22:24 2012 +0100
+++ b/mercurial/context.py	Mon Dec 17 15:06:15 2012 +0100
@@ -264,6 +264,10 @@
         """
         return self.rev() in obsmod.getrevs(self._repo, 'divergent')
 
+    def troubled(self):
+        """True if the changeset is either unstable, bumped or divergent"""
+        return self.unstable() or self.bumped() or self.divergent()
+
     def _fileinfo(self, path):
         if '_manifest' in self.__dict__:
             try: