Using base tags in Mercurial <p>We just started using hg and we're using base tags for common modules in our system. I have a few questions about how tags work. </p> <ul> <li><p>(#1) When I add a tag using the following command, does it automatically check in the .hgtags file for me?</p> <p>hg tag MY_TAG</p></li> <li><p>When I add a tag for the first time, it adds a line to the the .hgtags file. When I do a -f (force) on the tag command, it adds another entry to the file. Then, when I remove it, it adds <strong>2 more</strong> lines to the .hgtags file. Ultimately my file ends up looking like this:</p></li> </ul> <blockquote> <pre><code>af9e9bf4cf004a7fab4f911e95d1002579fd851a MY_TAG //from initial tag af9e9bf4cf004a7fab4f911e95d1002579fd851a MY_TAG //from delete (1/2) 0000000000000000000000000000000000000000 MY_TAG //from delete (2/2) 4611114976f02dd0d4f8ec9e84266dcea161cd3f MY_TAG //from tag after pull 0426c9e6e0ccf01e6d18d85420466d1edd1bff1f MY_TAG //from forced tag </code></pre> </blockquote> <ul> <li><p>(#2) Why does it keep adding lines to the .hgtags file? When I'm doing a base tag, I only really care to have a single entry in the file. Should I care about this bloat? Do I have to manually manage the .hgtags file to work in this way?</p></li> <li><p>(#3) Also, do the delete lines have to remain contiguous in the file? </p></li> <li><p>(#4) Is the file read from top to bottom, or does Mercurial actually find the latest changeset and use that one when I move to a tag?</p></li> </ul>