Mercurial > hg
changeset 18160:dc526561111c
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)
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Mon, 17 Dec 2012 15:06:15 +0100 |
parents | 8019f96ec4ce |
children | 5b117f82cbdb |
files | mercurial/context.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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: