Mercurial > hg
changeset 33729:8413cbeae275
context: rename bumped into phasedivergent
Rename bumped context method into phasedivergent and add a deprecation warning
on bumped.
Only update all callers to keep the patch straightforward.
The renaming is done according to
https://www.mercurial-scm.org/wiki/CEDVocabulary.
Differential Revision: https://phab.mercurial-scm.org/D241
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 02 Aug 2017 19:09:00 +0200 |
parents | 8b2d7684407b |
children | 52c5ff856b49 |
files | mercurial/context.py |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Wed Aug 02 19:02:48 2017 +0200 +++ b/mercurial/context.py Wed Aug 02 19:09:00 2017 +0200 @@ -214,6 +214,12 @@ return self.rev() in obsmod.getrevs(self._repo, 'unstable') 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 Only non-public and non-obsolete changesets may be bumped. @@ -235,7 +241,7 @@ def troubled(self): """True if the changeset is either unstable, bumped or divergent""" - return self.orphan() or self.bumped() or self.contentdivergent() + return self.orphan() or self.phasedivergent() or self.contentdivergent() def troubles(self): """Keep the old version around in order to avoid breaking extensions @@ -248,7 +254,7 @@ troubles = [] if self.orphan(): troubles.append('orphan') - if self.bumped(): + if self.phasedivergent(): troubles.append('bumped') if self.contentdivergent(): troubles.append('divergent') @@ -265,7 +271,7 @@ instabilities = [] if self.orphan(): instabilities.append('orphan') - if self.bumped(): + if self.phasedivergent(): instabilities.append('phase-divergent') if self.contentdivergent(): instabilities.append('content-divergent')