# HG changeset patch # User Boris Feld # Date 1501693368 -7200 # Node ID 8b2d7684407b4bd0d33fea17e4812f0327abe423 # Parent f163edb45c4705ba377e45da477de48ba90e9c91 context: rename divergent into contentdivergent Rename divergent context method into contentdivergent and add a deprecation warning on divergent. 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/D240 diff -r f163edb45c47 -r 8b2d7684407b mercurial/context.py --- a/mercurial/context.py Wed Aug 02 18:50:32 2017 +0200 +++ b/mercurial/context.py Wed Aug 02 19:02:48 2017 +0200 @@ -221,6 +221,12 @@ return self.rev() in obsmod.getrevs(self._repo, 'bumped') 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 Only non-public and non-obsolete changesets may be divergent. @@ -229,7 +235,7 @@ def troubled(self): """True if the changeset is either unstable, bumped or divergent""" - return self.orphan() or self.bumped() or self.divergent() + return self.orphan() or self.bumped() or self.contentdivergent() def troubles(self): """Keep the old version around in order to avoid breaking extensions @@ -244,7 +250,7 @@ troubles.append('orphan') if self.bumped(): troubles.append('bumped') - if self.divergent(): + if self.contentdivergent(): troubles.append('divergent') return troubles @@ -261,7 +267,7 @@ instabilities.append('orphan') if self.bumped(): instabilities.append('phase-divergent') - if self.divergent(): + if self.contentdivergent(): instabilities.append('content-divergent') return instabilities