[PATCH 1 of 2] identify: build the tag list directly instead of using wctx.tags()

Matt Mackall mpm at selenic.com
Mon Jun 29 18:03:57 CDT 2015


On Mon, 2015-06-29 at 19:01 -0400, Matt Harbison wrote:
> On Mon, 29 Jun 2015 18:55:37 -0400, Matt Mackall <mpm at selenic.com> wrote:
> 
> > On Sun, 2015-06-28 at 15:34 -0400, Matt Harbison wrote:
> >> # HG changeset patch
> >> # User Matt Harbison <matt_harbison at yahoo.com>
> >> # Date 1435512137 14400
> >> #      Sun Jun 28 13:22:17 2015 -0400
> >> # Node ID 87c10f86c7517d0f8c42a080821c4b399d6f9755
> >> # Parent  6368c51cfad6dc5f9c46369ed5e17cf8bd09efae
> >> identify: build the tag list directly instead of using wctx.tags()
> >>
> >> The current implementation of workingctx.tags() returns the tags of the  
> >> parents.
> >> This causes the calculation of {lastesttagdistance} from wdir() to be  
> >> wrong.
> >> The value when updated to a tag is 0, but updated to the tag's child is  
> >> 2, the
> >> child of that 3, and so on.  This prepares for workingctx.tags() to not  
> >> report
> >> the parent tags.
> >
> > This raises the question of whether wdir() and . are really the same
> > commit when wdir() is clean, right? Mostly we're fine with ignoring that
> > distinction but here it worries me: if I checkout a pristine 1.0 and
> > archive wdir(), now it tells me it's not 1.0, right?
> 
> That seems to be the case.
> 
> The other thing I was toying with was to do a dirty check inside  
> wctx.tags(), and use the old code path if it was clean.  But I didn't want  
> to do that while Yuya and I were debating the same issue in the  
> {changessincelasttag} patch.
> 
> If we do separate them, does 'tip' go with '.' or 'wdir()'?

Let us not speak of tip. (But the answer is .)

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list