在没有管理员访问权限的情况下,如何在CVS中重命名分支? [英] How do you rename a branch in CVS without admin access?

查看:104
本文介绍了在没有管理员访问权限的情况下,如何在CVS中重命名分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个单独的问题涵盖了如何重命名假设您有权访问cvs管理员命令。

A separate question covers How do you rename a branch in CVS? assuming you have access to cvs admin commands.

是否可以在不使用cvs管理员命令的情况下执行此操作?

Is it possible to do this without using cvs admin commands?

推荐答案

您的意思是重命名还是重新编号?。

Do you mean "rename" or "renumber?".

分支标记是在CVS中有点奇怪。标记名称的特殊之处在于它标记了分支修订而不是版本修订。

Branch tags are a bit weird in CVS. The tag name is sort of special in that it labels a branch revision as opposed to a version revision.

您可以在创建最后一个分支的同时创建一个新分支。分支(只要在那里有一个标签),然后删除旧的分支标签名称。 (分支实际上不会消失,但这无关紧要)。但这会丢失对分支所做的任何更改。

You can create a new branch at the same point you created the last branch (so long as you have a tag there), and then delete the old branch tag name. (The branch never actually disappears, but that doesn't matter). But that loses any changes that have already been made to the branch.

否则,您只需从分支重新分支即可,其效果与重命名几乎相同,除了您所有的分支修订版本号增加了2个级别,并且任何分支绘图工具都显示了更复杂的结构。

Otherwise you can just rebranch from the branch which achieves much the same effect as renaming it except that all your revision numbers become 2 levels longer and any branch graphing tool shows a more complex structure.

距离我已经玩了两年了,但是我认为CVS可以让您如果您为特殊的分支修订版本号(具有奇数个级别,或倒数第二个级别== 0)创建标签,则为现有分支创建新名称。

It's been a couple of years since I played around with this but I think CVS lets you create a new name for an existing branch if you create a tag to the special branch revision number (which has an odd number of levels, or has the second-to-last level == 0).

麻烦的是,存储库中的每个文件都将以不同的版本进行分支,因此您必须在适当的版本中分别重新标记每个文件。

The trouble is, every file in your repository will have been branched at a different revision so you'll have to retag every file individually at the appropriate revision.

创建新分支后,删除旧的分支标签很简单,该标签只会从分支中删除该名称,而使分支保持完整。

Once you've created your new branch, it's a simple matter to delete the old branch tag which just removes that name from the branch but leaves the branch intact.

这篇关于在没有管理员访问权限的情况下,如何在CVS中重命名分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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