Reputation: 10414
I use a local tag "lcb"
to identify always the latest changeset which I have bundled up for some emailing purposes.
Before I move that tag forward I want to put another tag "lcb-old"
there (so that I can move 'lcb"
back if needed). How can I do this?
In other words how can I duplicate a tag whose position (i.e changeset id) I don't know?
Many thanks!
Upvotes: 0
Views: 86
Reputation: 3577
Just like the regular tags, local tags can only identify one changeset, so they cannot be duplicated. That answers your question from your title.
For your second question, yes, you can have multiple tags for the same changeset, so your lcb-old
tag can be at the same place as the lcb
tag. Just add it as you did for the others.
And for your third question, sorry, you cannot add a tag to a changeset that do not exist yet. Within the localtags
file, the tags are added as a pair: changesetID and tag.
Now, as a conclusion, if I get what you are trying to do, is to tag the old lcb
tag as lcb-old
, and place the new lcb
tag at the tip of the branch. This can be done easily with the following commands, every time a new tag must be set:
hg tag -l --remove lcb-old
hg tag -l --rev lcb lcb-old
hg tag -l --remove lcb
hg tag -l --rev tip lcb
Upvotes: 1