Re: D242: context: rename troubled into isunstable

2017-08-14 Thread Boris Feld
On Sun, 2017-08-13 at 05:01 +, yuja (Yuya Nishihara) wrote:
> yuja added inline comments.
> 
> INLINE COMMENTS
> 
> > context.py:246
> > +self._repo.ui.deprecwarn(msg, '4.4')
> > +return self.isunstable()
> > +
> 
> Please send a follow-up. This is too far from the tip to amend.

I will do send a follow-up, thank you for catching that, I thought it
had been pushed into commited.

> 
> REPOSITORY
>   rHG Mercurial
> 
> REVISION DETAIL
>   https://phab.mercurial-scm.org/D242
> 
> To: lothiraldan, #hg-reviewers
> Cc: yuja, mercurial-devel
> ___
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: D242: context: rename troubled into isunstable

2017-08-09 Thread Boris Feld
On Wed, 2017-08-09 at 12:32 -0400, Brandon McCaig wrote:
> On Wed, Aug 09, 2017 at 03:37:26PM +, 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@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: D242: context: rename troubled into isunstable

2017-08-09 Thread Brandon McCaig
On Wed, Aug 09, 2017 at 03:37:26PM +, 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().

> +
> +def isunstable(self):
>  """True if the changeset is either unstable, bumped or divergent"""
>  return self.orphan() or self.phasedivergent() or 
> self.contentdivergent()

Regards,


-- 
Brandon McCaig  
Castopulence Software 
Blog 
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'



signature.asc
Description: Digital signature
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel