Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 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 | ee3b5fb648c7 |
children | 5b117f82cbdb |
comparison
equal
deleted
inserted
replaced
18159:8019f96ec4ce | 18160:dc526561111c |
---|---|
262 | 262 |
263 Only non-public and non-obsolete changesets may be divergent. | 263 Only non-public and non-obsolete changesets may be divergent. |
264 """ | 264 """ |
265 return self.rev() in obsmod.getrevs(self._repo, 'divergent') | 265 return self.rev() in obsmod.getrevs(self._repo, 'divergent') |
266 | 266 |
267 def troubled(self): | |
268 """True if the changeset is either unstable, bumped or divergent""" | |
269 return self.unstable() or self.bumped() or self.divergent() | |
270 | |
267 def _fileinfo(self, path): | 271 def _fileinfo(self, path): |
268 if '_manifest' in self.__dict__: | 272 if '_manifest' in self.__dict__: |
269 try: | 273 try: |
270 return self._manifest[path], self._manifest.flags(path) | 274 return self._manifest[path], self._manifest.flags(path) |
271 except KeyError: | 275 except KeyError: |