[PATCH 2 of 2] templatekw: introduce the changessincelatesttag keyword

Yuya Nishihara yuya at tcha.org
Tue Jun 30 09:09:41 CDT 2015


On Tue, 30 Jun 2015 09:16:37 -0400, Matt Harbison wrote:
> On Tue, 30 Jun 2015 08:21:13 -0400, Yuya Nishihara <yuya at tcha.org> wrote:
> > On Mon, 29 Jun 2015 17:45:27 -0500, Matt Mackall wrote:
> >> On Mon, 2015-06-29 at 12:45 -0400, Matt Harbison wrote:
> >> > On Mon, 29 Jun 2015 05:15:20 -0400, Pierre-Yves David
> >> > <pierre-yves.david at ens-lyon.org> wrote:
> >> > > rev = maxint
> >> > > hex = 'f' * 40 (and related node)
> >> >
> >> > I assume that means wctx.rev() will return maxint, not just that  
> >> maxint is
> >> > magic within a revset?  Should we put a wdirrev = None in node for  
> >> now,
> >> > and switch it later when ready?
> >
> > That seems inverse. What we want is an integer other than None for  
> > revset.
> >
> >> > I've got 2 patches that rely on None, and
> >> > I know I've added others in the past.  It seems silly to hunt them all
> >> > down later, but IDK how soon we are ready to pull the trigger on this
> >> > change.
> >>
> >> I'm fine with a fair amount of churn here as long as you and Yuya can
> >> agree on a direction.
> >
> > My current plan is
> >
> >   wdirrev = 0x7fffffff
> >   repo[None] -> wctx
> >   repo[wdirrev] -> wctx
> >   repo.revs('wdir()') -> [wdirrev]
> >   # but
> >   wctx.rev() -> None
> >   wctx.node() -> None
> 
> Oh, OK.  I assumed these last two would have to change at the same time.
> 
> > We might want to change wctx.rev() -> wdirrev and wctx.node() -> 'ff...'  
> > at
> > some time, but it will require a huge amount of careful investigation.
> > "grep None **/*.py" isn't enough.
> 
> Agreed, which is why I figured we want a symbolic name for this, so that
> we don't continue to dig the hole deeper.  'altwdirrev = None', like
> os.altsep?  Then, if/when we decide to switch altrev from None to wdirrev,
> fewer things will break, and these new uses going forward can be grepped.
> After any switch, it can probably be dropped.

We might want it, but the wdirrev/wdirnode are not proven idea yet. So, first
I want to see if they can actually mitigate problems. If they go well, we'll
probably want to make a plan to drop the None revision.


More information about the Mercurial-devel mailing list