fre*_*set 16 mercurial tagging
我忘了使用发布标记标记我的文件的旧版本.旧版本是r13,最新版本是r65.我将最新的存储库克隆到一个新目录,做了一个"hg update -r13"来获取我想要标记的旧代码,然后执行了tag命令,但收到了消息:
中止:不在分支头(使用-f强制)
在这种情况下使用-f选项是否安全?
pyf*_*unc 19
我想你仍然可以在回购中进行标记,而无需更新自己的特定版本.
hg tag -r 13标记名
请参阅Mercurial wiki的详细信息.
我试过测试一下:
temp $ hg init .
temp $ touch a.txt
temp $ hg add a.txt
temp $ hg commit -m "added a"
temp $ hg status
temp $ echo "sdwwdd" >> a.txt
temp $ hg commit -m "modified a"
temp $ echo "\neddwedd" >> a.txt
temp $ hg commit -m "modified a again"
temp $ hg log
changeset: 2:ef40a402fdab
tag: tip
user: "xxxx"
date: Fri Dec 23 16:51:48 2011 -0800
summary: modified a again
changeset: 1:d630dc3e2e3a
user: "xxxx"
date: Fri Dec 23 16:51:31 2011 -0800
summary: modified a
changeset: 0:7c9917f24515
user: "xxxx"
date: Fri Dec 23 16:51:04 2011 -0800
summary: added a
Run Code Online (Sandbox Code Playgroud)
输出:
temp $ hg tag -r 1 a.txt a_1
temp $ hg tags
tip 3:e3157256098f
a_1 1:d630dc3e2e3a
a.txt 1:d630dc3e2e3a
temp $ hg tag -r 1 all_1
temp $ hg tags
tip 4:a643971911d8
all_1 1:d630dc3e2e3a
a_1 1:d630dc3e2e3a
a.txt 1:d630dc3e2e3a
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2516 次 |
| 最近记录: |