Tortoise HG - Add a tag on commit

Casebash picture Casebash · Dec 22, 2010 · Viewed 8.8k times · Source

At the moment, I only know how to add a tag after a commit. This means that a get a second commit that just contains the tag. Is it possible to add a tag on commit?

Answer

Mark Tolonen picture Mark Tolonen · Dec 22, 2010

No, because a tag is an entry in the .hgtags file at the root of your repository containing the changeset id and the tag name, and this file itself is under revision control. The changeset id isn't known until the changeset is created, so tagging creates another changeset to check in the .hgtags file recording the tag for that changeset.