Mercurial > hg
changeset 35890:44bc37d20271
context: drop deprecated methods (API)
.. api::
The following deprecated methods have been removed from context, with
replacements:
- unstable() -> orphan()
- bumped() -> phasedivergent()
- divergent() -> contentdivergent()
- troubled() -> isunstable()
- troubles() -> instabilities()
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 02 Feb 2018 23:27:30 -0500 |
parents | e49c39ffeac2 |
children | 75d9dcb64e7d |
files | mercurial/context.py |
diffstat | 1 files changed, 0 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Thu Jan 25 20:00:58 2018 +0100 +++ b/mercurial/context.py Fri Feb 02 23:27:30 2018 -0500 @@ -206,22 +206,10 @@ """True if the changeset is extinct""" return self.rev() in obsmod.getrevs(self._repo, 'extinct') - def unstable(self): - msg = ("'context.unstable' is deprecated, " - "use 'context.orphan'") - self._repo.ui.deprecwarn(msg, '4.4') - return self.orphan() - def orphan(self): """True if the changeset is not obsolete but it's ancestor are""" return self.rev() in obsmod.getrevs(self._repo, 'orphan') - def bumped(self): - msg = ("'context.bumped' is deprecated, " - "use 'context.phasedivergent'") - self._repo.ui.deprecwarn(msg, '4.4') - return self.phasedivergent() - def phasedivergent(self): """True if the changeset try to be a successor of a public changeset @@ -229,12 +217,6 @@ """ return self.rev() in obsmod.getrevs(self._repo, 'phasedivergent') - def divergent(self): - msg = ("'context.divergent' is deprecated, " - "use 'context.contentdivergent'") - self._repo.ui.deprecwarn(msg, '4.4') - return self.contentdivergent() - def contentdivergent(self): """Is a successors of a changeset with multiple possible successors set @@ -242,33 +224,10 @@ """ return self.rev() in obsmod.getrevs(self._repo, 'contentdivergent') - def troubled(self): - msg = ("'context.troubled' is deprecated, " - "use 'context.isunstable'") - self._repo.ui.deprecwarn(msg, '4.4') - return self.isunstable() - def isunstable(self): """True if the changeset is either unstable, bumped or divergent""" return self.orphan() or self.phasedivergent() or self.contentdivergent() - def troubles(self): - """Keep the old version around in order to avoid breaking extensions - about different return values. - """ - msg = ("'context.troubles' is deprecated, " - "use 'context.instabilities'") - self._repo.ui.deprecwarn(msg, '4.4') - - troubles = [] - if self.orphan(): - troubles.append('orphan') - if self.phasedivergent(): - troubles.append('bumped') - if self.contentdivergent(): - troubles.append('divergent') - return troubles - def instabilities(self): """return the list of instabilities affecting this changeset.