Mercurial:如何更改标签名称 [英] mercurial: how to change name of a tag

查看:85
本文介绍了Mercurial:如何更改标签名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所述:我已经在水银标签上做了标记.

Just as the title says: I have made a tag in mercurial.

hg tag release_123

但是后来我发现名称错误,应该是release_124.是否可以简单地重命名标签,还是必须创建一个新标签?

But later on I found out that the name was wrong, it should be release_124. Is it possible to simply rename the tag or do I have to create a new one?

推荐答案

我可以通过删除标签,然后添加具有新名称的新标签来实现此目的

I would do it by removing the tag and then adding a new tag with the new name

Mercurial标签Wiki 说明了如何删除标签:

The Mercurial tag wiki explains how to remove a tag:

如何删除标签?

要么通过

How do I remove a tag?

Either by

  • hg tag --remove tagname
  • hg tag --remove tagname

(与cvs标签-d最接近)

(this being the nearest equivalent to cvs tag -d)

  • 将标记名0000000000000000000000000000000000000000000000添加到末尾 .hgtags

  • adding tagname 0000000000000000000000000000000000000000 to the end of .hgtags

删除.hgtags中对标记名的所有引用(但这可能 混淆多头标签冲突解决算法)

removing all references to tagname in .hgtags (but this might confuse the multiple-head tag collision resolution algorithm)

这篇关于Mercurial:如何更改标签名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆