Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 33756:52c5ff856b49
context: rename troubled into isunstable
As we changed the meaning of unstable between the old vocabulary and the new
one, we can't reuse the unstable method name at the risk of breaking
extensions calling unstable and getting a wrong result.
Instead rename troubled into isunstable so extensions will continue to work.
The renaming is done according to
https://www.mercurial-scm.org/wiki/CEDVocabulary.
Differential Revision: https://phab.mercurial-scm.org/D242
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 02 Aug 2017 19:13:56 +0200 |
parents | 8413cbeae275 |
children | d4b7496f7d0b |
comparison
equal
deleted
inserted
replaced
33755:8413cbeae275 | 33756:52c5ff856b49 |
---|---|
238 Only non-public and non-obsolete changesets may be divergent. | 238 Only non-public and non-obsolete changesets may be divergent. |
239 """ | 239 """ |
240 return self.rev() in obsmod.getrevs(self._repo, 'divergent') | 240 return self.rev() in obsmod.getrevs(self._repo, 'divergent') |
241 | 241 |
242 def troubled(self): | 242 def troubled(self): |
243 msg = ("'context.troubled' is deprecated, " | |
244 "use 'context.isunstable'") | |
245 self._repo.ui.deprecwarn(msg, '4.4') | |
246 return self.unstable() | |
247 | |
248 def isunstable(self): | |
243 """True if the changeset is either unstable, bumped or divergent""" | 249 """True if the changeset is either unstable, bumped or divergent""" |
244 return self.orphan() or self.phasedivergent() or self.contentdivergent() | 250 return self.orphan() or self.phasedivergent() or self.contentdivergent() |
245 | 251 |
246 def troubles(self): | 252 def troubles(self): |
247 """Keep the old version around in order to avoid breaking extensions | 253 """Keep the old version around in order to avoid breaking extensions |