I have been reading about mercurial tags. I can see, usually, we tag a changeset to mark a release point and these tags are revision controlled too.
But I could not really understand the idea of having a .hgtags
file. What is the purpose of this file?
A tag is a symbolic identifier for a changeset. It can contain any characters except ":" (colon), "\r" (Carriage Return) or "\n" (Line Feed). Mercurial has two kinds of tags: local and regular.
If you want to remove a tag that you no longer want, use hg tag --remove . You can also modify a tag at any time, so that it identifies a different revision, by simply issuing a new hg tag command.
hg status shows the status of a repository. Files are stored in a project's working directory (which users see), and the local repository (where committed snapshots are permanently recorded). hg add tells Mercurial to track files. hg commit creates a snapshot of the changes to 1 or more files in the local repository.
Having a .hgtags
file allows changes to the .hgtags
file to be recorded using the same format used to record changes to all other files. It also allows tags to be transferred between repositories in the same format used for transferring file changes.
This allows Mercurial to implement one system for storing changes to a directory, and one protocol for transferring a bunch of changes to a directory and have branching and tag information automatically handled in the when transferring file changes.
It also allows the one to view the history of the tags for a project, by looking at the history of the .hgtags
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With