Unknown revision numbers in bzr tags command
When I run the bzr tags
command on a branch, I often get some tags that are displayed with no revision number. It appears as a question mark. For example, when I run this command:
bzr tags -d lp:~zaber/openobject-client/main
tag 5.0.7 doesn't have a revision number:
5.0.0 930
5.0.0-2 933
5.0.0-3 938
5.0.0-alpha 719
5.0.0-rc1 771
5.0.0-rc1.1 776
5.0.0-rc2 830
5.0.0-rc3 858
5.0.1 946.1.19
5.0.2 976
5.0.3 开发者_C百科 983
5.0.4 986
5.0.5 993
5.0.6 1000
5.0.7 ?
5.0.7rc1 1022
5.0.7rc2 1042
This may happen more often when I've got shared repositories for several local branches, but I'm not sure.
Those tags are known to bzr (fetched or merged from another branch in some pull or merge operation) but corresponding revision is not present in your history (not merged to your branch).
Strictly to say that's a bug, you can find it in the bzr bugtracker on Launchpad.net.
What you can do about such tags:
- remove them from your branch only with
bzr tag --delete XXX
- use them to merge those revisions later with
bzr merge -r tag:YYY lp:XXX
- look at the corresponding revision ids with
bzr tags --show-ids
As bialix suggested, deleting the tags using bzr tag --delete XXX
works. Also, deleting a tag on a checkout also deletes the tag on the master branch. (I guess that's parallel to the way commits work, but it still surprised me.) Sometimes a merge will bring a bunch of broken tags across, so here's a gawk command to remove all unknown tags from the local branch:
bzr tags | gawk '/\?/ { system("bzr tag --delete " $1) }'
精彩评论