[PATCH 1 of 3 STABLE] tags: prevent local tag from overwriting existing global tag

Matt Mackall mpm at selenic.com
Wed Apr 24 16:33:02 CDT 2013


On Thu, 2013-04-25 at 00:12 +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> # Date 1366814858 -32400
> #      Wed Apr 24 23:47:38 2013 +0900
> # Branch stable
> # Node ID e20be67cf59c775a9df3b1b462ea4ee402ba89b3
> # Parent  70675d77fd4a78d3e57723550d9f3031345d38e4
> tags: prevent local tag from overwriting existing global tag
> 
> Before this patch, local tag has higher priority than existing global
> tag in many cases, because ".hg/localtags" is read in after ".hgtags"
> on each head revisions.

That's intentional. The logic is that, lacking any way to compare
ordering between local and global tags, "my tag" is more important than
"their tag".

This has the advantage that I have the ability to -change- a local tag
locally to have control over exactly this sort of conflict should I have
been so foolish as to pick a local tag name that collides with a global
one. Moving global tags to resolve such a conflict is a less good idea.

Even if it wasn't intentional, it now has 8 years of precedent, and we
can't guess if people are depending on it continuing to work this way.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list