如何在CVS中重命名分支? [英] How do you rename a branch in CVS?

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

问题描述

如果您在CVS中未正确命名分支,或者最初选择的名称不合适,您如何将其更改为其他名称?

If you've named a branch in CVS incorrectly, or the name originally chosen becomes inappropriate, how do you change it to something else?

一个相关的问题是如何在没有管理员的情况下在CVS中重命名分支

推荐答案

诀窍是使用CVS较为模糊的管理命令之一-N。这是一个分为两个阶段的过程,有效地复制然后删除。

The trick to this is using one of CVSs' more obscure admin commands, -N. It is a two stage process, effectively copy then remove.

首先,创建一个具有正确名称的分支,该分支引用原始分支名称。其次,删除原始分支名称。

Firstly, you create a branch with the correct name that references the original branch name. Secondly, you delete the original branch name.

假定您有一个文件 File.txt,当前分支为 bad _ branch。您希望呼叫该分支-您能猜到吗? - good _ branch。

Assume you have a file "File.txt" that is currently branched "bad_branch". You'd like the branch to be called - can you guess? - "good_branch".


kwutchak%cvs log File.txt

kwutchak% cvs log File.txt

RCS文件:... / data / File.txt,v

头:1.1

分支:

符号名称:

bad _ 分支:1.1.0.2

RCS file: .../data/File.txt,v
head: 1.1
branch:
symbolic names:
bad_branch: 1.1.0.2



要创建新的分支引用:



To create the new branch reference:

cvs admin -N good_branch:bad_branch File.txt




kwutchak%cvs log File.txt

kwutchak% cvs log File.txt

RCS文件:... / data / File.txt,v

工作文件:File.txt

头:1.1

分支:

符号名称:

好​​ _ 分支:1.1.0.2

_ 分支:1.1.0.2

RCS file: .../data/File.txt,v
Working file: File.txt
head: 1.1
branch:
symbolic names:
good_branch: 1.1.0.2
bad_branch: 1.1.0.2



要删除原始引用:



To delete the original reference:

cvs admin -N bad_branch File.txt




kwutchak%cvs日志File.txt

kwutchak% cvs log File.txt

RCS文件:... / data / Fi le.txt,v

工作文件:File.txt

头:1.1

分支:

符号名称:

good _ 分支:1.1.0.2

RCS file: .../data/File.txt,v
Working file: File.txt
head: 1.1
branch:
symbolic names:
good_branch: 1.1.0.2

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

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