如何更改标签的名称? [英] How can one change the name of a tag?

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

问题描述

我在 mercurial 中做了一个标签:

I have made a tag in mercurial:

hg tag release_123

后来发现名字不对,应该是release_124.是否可以简单地重命名标签或者我必须创建一个新标签?

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 标签维基解释了如何删除标签:

要么通过

  • hg tag --remove tagname

(这是与 cvs tag -d 最接近的等价物)

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

  • 在末尾添加tagname 000000000000000000000000000000000000000.hgtags

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

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

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

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