[PATCH 1 of 2] Add a test highlighting duplicate tags issues

Benoit Boissinot benoit.boissinot at ens-lyon.org
Fri Apr 9 11:25:11 CDT 2010


On Fri, Apr 09, 2010 at 11:48:40AM -0400, Greg Ward wrote:
> On Thu, Apr 8, 2010 at 5:38 AM, Pierre-Yves David
> <pierre-yves.david at ens-lyon.org> wrote:
> > # HG changeset patch
> > # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> > # Date 1270719041 -7200
> > # Branch stable
> > # Node ID 892f5ed1ca1ed2e89144f7537103bda768a50ea3
> > # Parent  1148a968a0700d047c790edd5cbded240534da2e
> > Add a test highlighting duplicate tags issues
> >
> > This changetset add test-tag-duplicates that highlight the following issue:
> >
> > When a tag is overwritten using the --force option, two line are added to the
> > .hgtags file intead of one. One with the old changeset hash previously tagged
> > and one with the new changeset tagged by the command. The old changeset hash
> > then appear twice before beeing finally overwriten by the new changeset tagged.
> 
> I believe this is the intended behaviour, i.e. not a bug.  It has to
> do with "tag weighting" -- the idea is that more recent changes in
> .hgtags (closer to the bottom of the file) should trump older changes.
>  This matters if you change the same tag to point to two different
> changesets on different branches.  Mercurial has to figure out *one*
> changeset for that tag despite the inconsistent information, and the
> trick with duplicate tag lines has something to do with that.

I think this only apply if the tag isn't already in the file, if it is
there is no need to add it a second time.

Benoit

-- 
:wq


More information about the Mercurial-devel mailing list