要更新我們的軟件的版本號,腳本執行以下操作:是否允許在Mercurial中標記標籤?
$ hg update v3.3
(sed+awk magic to edit version numbers in code base)
$ hg commit -m"Create v3.3.50"
$ hg tag v3.3.50
$ hg push
abort: push creates new remote head 101b0ff402c6 on branch 'v3.3'!
(pull and merge or see "hg help push" for details about pushing new heads)
$ hg pull --branch v3.3 --rebase
...
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
$ hg push
...
added 2 changesets with 4 changes to 4 files
但提交後,標籤似乎沒有目標資源庫中存在:
$ hg tags | grep v3.3.50
$
混淆,標籤是在.hgtags文件:
$ grep v3.3.50 .hgtags
e7d6c19f8dd86cdad4cb41f543d09dbe5d30405e v3.3.50
,並在修訂歷史:
$ hg log -b v3.3
changeset: 7067:701358ca0f4b
branch: v3.3
user: Joe User <[email protected]>
date: Wed Nov 11 12:41:15 2015 -0800
summary: Added tag v3.3.50 for changeset e7d6c19f8dd8
changeset: 7066:19aafdd33263
branch: v3.3
user: Joe User <[email protected]>
date: Wed Nov 11 12:41:15 2015 -0800
summary: Create v3.3.50
hg commit/tag/push
序列按預期工作,但添加rebase似乎至少部分刪除標記。標籤是否需要對rebase命令進行特殊處理?
Mercurial版本是2.9.2,系統正在運行最新版本的Ubuntu。