tag questions - Are spaces allowed? Can they be deleted?

Matt Mackall mpm at selenic.com
Tue Sep 20 23:55:37 CDT 2005


On Tue, Sep 20, 2005 at 09:49:42PM -0700, Rob Browning wrote:
> 
> After reading the hg manpage, I still wasn't quite sure about the
> legal tag syntax.  The manpage only says that colons are forbidden, so
> are spaces acceptable, as in "Release 2.3.1"?

Yes. Using the tag command, you'll want to do something like:

$ hg tag "Release 2.3.1"

> Also, is there any way to "delete" a tag, so that future operations
> won't see it, at least not unless that same tag is reinstated by some
> newer changeset?

Yes. Tags are maintained in a regular file called .hgtags. It looks
like this:

$ cat .hgtags
d40cc5aacc31ed673d9b5b24f98bee78c283062c 0.4f
1c590d34bf61e2ea12c71738e5a746cd74586157 0.4e
7eca4cfa8aad5fce9a04f7d8acadcd0452e2f34e 0.4d
b4d0c3786ad3e47beacf8412157326a32b6d25a4 0.4c
f40273b0ad7b3a6d3012fd37736d0611f41ecf54 0.5
0a28dfe59f8fab54a5118c5be4f40da34a53cdb7 0.5b
12e0fdbc57a0be78f0e817fd1d170a3615cd35da 0.6
4ccf3de52989b14c3d84e1097f59e39a992e00bd 0.6b
eac9c8efcd9bd8244e72fb6821f769f450457a32 0.6c
979c049974485125e1f9357f6bbe9c1b548a64c3 0.7

To delete a tag, or change a tag, or whatever, just edit this file and
check it in:

$ emacs .hgtags
$ hg ci .hgtags -m "remove a tag"
 
The hg tag command is simply a shortcut.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list