diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -1464,7 +1464,7 @@ labels = ['log.changeset', 'changeset.%s' % ctx.phasestr()] if ctx.obsolete(): labels.append('changeset.obsolete') - if ctx.troubled(): + if ctx.isunstable(): labels.append('changeset.troubled') for instability in ctx.instabilities(): labels.append('trouble.%s' % instability) @@ -1577,7 +1577,7 @@ self.ui.write(_("date: %s\n") % date, label='log.date') - if ctx.troubled(): + if ctx.isunstable(): # i18n: column positioning for "hg log" instabilities = ctx.instabilities() self.ui.write(_("instability: %s\n") % ', '.join(instabilities), diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4849,7 +4849,7 @@ ui.write(_(' (no revision checked out)')) if p.obsolete(): ui.write(_(' (obsolete)')) - if p.troubled(): + if p.isunstable(): instabilities = (ui.label(instability, 'trouble.%s' % instability) for instability in p.instabilities()) ui.write(' (' diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -240,6 +240,12 @@ return self.rev() in obsmod.getrevs(self._repo, 'divergent') def troubled(self): + msg = ("'context.troubled' is deprecated, " + "use 'context.unstable'") + self._repo.ui.deprecwarn(msg, '4.4') + return self.unstable() + + def isunstable(self): """True if the changeset is either unstable, bumped or divergent""" return self.orphan() or self.phasedivergent() or self.contentdivergent() diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -690,7 +690,7 @@ ctx = unfi[node] if ctx.obsolete(): raise error.Abort(mso % ctx) - elif ctx.troubled(): + elif ctx.isunstable(): raise error.Abort(mst[ctx.instabilities()[0]] % ctx) discovery.checkheads(pushop)