Thomas (boggyb) wrote,

  • Mood:

On Mercurial and tags

Today's discovery is that Mercurial is incapable of tagging a repository unless you've created a working directory for it. This is because Mercurial stores its tags in a ".hgtags" file in your working directory, so that it can version the tags file.

Of course, should you attempt to tag a repository without having a fully-updated working directory, Mercurial will fail with some nonsense about .hgtags having already been modified.

Ancillary discovery: should you typo when tagging a repository, the best way to recover appears to be to blow away your local repository and working directory and start again with a freshly-cloned one. Attempting to revert .hgtags doesn't appear to do anything.

Extra special discovery: it is impossible to tag a subset of a repository. Consequently, it is impossible to apply the same tag to different revisions of subsets of a repository. This is because you don't tag a file, or even a set of files - you tag a specific changeset.
Tags: rant

  • Pancakes!

    Since people have been prodding me for an update, here's a pancake-themed one (as everyone's blogging about pancakes today!). Unlike in the linked…

  • Snap, crackle, pop (again)

    [Adam Savage voice] "Well there's your problem!" So while cooking supper the other day the oven went snap, crackle, and pop, and the magic smoke…

  • Of carpentry and networking

    So, I'm not sure if I've bought a wifi router or a Cylon Raider here... Work colleague: Cylon raider. So say we all. Housegroup friend: Or a…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.