D242: context: rename troubled into isunstable
Boris Feld
boris.feld at octobus.net
Wed Aug 9 13:19:17 EDT 2017
On Wed, 2017-08-09 at 12:32 -0400, Brandon McCaig wrote:
> On Wed, Aug 09, 2017 at 03:37:26PM +0000, lothiraldan (Boris Feld)
> wrote:
> > 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.isunstable'")
> > + self._repo.ui.deprecwarn(msg, '4.4')
> > + return self.unstable()
>
> Maybe I'm missing something, but shouldn't this be:
>
> return self.isunstable()
>
> It sounded like context.unstable() has a different purpose and so
> troubled was renamed to isunstable and so troubled() itself
> should also be calling isunstable().
Yes, you are right. I am sending a fix right now on phabricator. Thank
you for the catch.
>
> > +
> > + def isunstable(self):
> > """True if the changeset is either unstable, bumped or
> > divergent"""
> > return self.orphan() or self.phasedivergent() or
> > self.contentdivergent()
>
> Regards,
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list