diff -r 86ea201eaeb9 -r ab0c55c2ad9a mercurial/context.py --- a/mercurial/context.py Tue Aug 08 17:25:38 2017 -0700 +++ b/mercurial/context.py Wed Aug 02 18:34:39 2017 +0200 @@ -226,21 +226,38 @@ return self.unstable() or self.bumped() or self.divergent() def troubles(self): - """return the list of troubles affecting this changesets. + """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 are returned as strings. possible values are: + troubles = [] + if self.unstable(): + troubles.append('orphan') + if self.bumped(): + troubles.append('bumped') + if self.divergent(): + troubles.append('divergent') + return troubles + + def instabilities(self): + """return the list of instabilities affecting this changeset. + + Instabilities are returned as strings. possible values are: - orphan, - phase-divergent, - content-divergent. """ - troubles = [] + instabilities = [] if self.unstable(): - troubles.append('orphan') + instabilities.append('orphan') if self.bumped(): - troubles.append('phase-divergent') + instabilities.append('phase-divergent') if self.divergent(): - troubles.append('content-divergent') - return troubles + instabilities.append('content-divergent') + return instabilities def parents(self): """return contexts for each parent changeset"""