[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:01:39 CDT 2015


On Mon, 2015-06-29 at 17:55 -0500, Matt Mackall 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?

And then I found the earlier discussion on this. I don't have a
super-strong opinion on this and am somewhat swayed by the "log shows an
extra commit argument", so I guess I'll take these.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list