Change order of lines in .hgtags to alleviate merge conflicts?

Greg Ward greg at gerg.ca
Sun Apr 3 10:10:36 CDT 2011


On 03 April 2011, Didly said:
> It seems the tag order in the .hgtags file is relevant... I think the
> last items on the file take precedence over the previous items, since
> tags can be mentioned more than once on the .hgtags file. However I
> don't really understand why this is so.

Please make sure you have read

  http://mercurial.selenic.com/wiki/TagDesign

That explains a lot of stuff.

Jason: on reflection, I suspect you may be right, that it's safe to
order .hgtags by tag name.  It is definitely not safe to order it by
changeset ID.  *But you have to preserve the existing order of entries
for each tag*.

However, IMHO it would make more sense to write a custom merge tool
for .hgtags.  I know, let's call it "internal:tags".  Shouldn't be
*that* hard.  That avoids messing with a rather tricky part of
Mercurial, and it means that all existing .hgtags files benefit
without having to be modified.

        Greg


More information about the Mercurial-devel mailing list