简体   繁体   English

如何撤消SVN中的“标记提交”?

[英]How do I undo “Tag commit” in SVN?

I want to undo commit of tag on SVN, not a commit of trunk/branch. 我想撤消SVN上的标签提交,而不是干线/分支提交。 How do i do that? 我怎么做?
Also, after deletion, if a tag commit is done, would revision number of new tag commit would be same as last deleted one or 1 higher? 另外,删除后,如果完成了标签提交,那么新标签提交的修订版本号将与上次删除的版本号相同或高1?
Thanks 谢谢
sedy 塞迪

Creating a tag in Subversion is functionally identical to creating a branch; 在Subversion中创建标签的功能与创建分支相同。 the only difference is the place you store them. 唯一的区别是它们的存储位置。

Assuming you created a tag by running something like svn copy svn://repo/trunk svn://repo/tags/tag_name , you can delete the tag by running svn rm svn://repo/tags/tag_name . 假设您通过运行svn copy svn://repo/trunk svn://repo/tags/tag_name类的东西来创建标签,则可以通过运行svn rm svn://repo/tags/tag_name来删除标签。

Creating the tag created a new revision number, deleting the tag will create another new revision number, and creating a replacement tag will create another one still. 创建标签会创建一个新的修订号,删除标签会创建另一个新的修订号,创建替换标签会创建另一个。 This may seem like it's not very neat, but it's generally considered a good idea keep the full history of the repository, so in future you can see what happened in the past. 这看起来似乎不是很整洁,但是通常认为保留存储库的完整历史记录是一个好主意,因此将来您可以查看过去发生的情况。 The impact on disk space of this is incredibly small, so that's not something you need to worry about. 这对磁盘空间的影响非常小,因此您无需担心。

If you do want to avoid the revision numbers incrementing like that, you'll need to completely remove the commit that created the tag from the Subversion repository. 如果确实要避免版本号那样增加,则需要从Subversion存储库中完全删除创建标记的提交。 This is possible, but it's difficult. 这是可能的,但是很困难。 The Subversion FAQ suggests multiple methods for deleting a commit permanently . Subversion FAQ建议了多种永久删除提交的方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM