如何进行部分 CVS 更新

发布于 2024-11-01 20:14:07 字数 417 浏览 3 评论 0原文

我正在开发一个项目,负责 2 个子组件。该项目有许多开发人员,整个结构是按目录层次结构组织的,其中根目录包含系统的所有其余部分。我们使用CVS。

由于我的工作仅关注这两个目录,因此我只需要使用 CURRENT 标签更新所有其余目录。有一个人为整个项目发布了 CURRENT 标签。理想情况下,我的两个子组件应尽可能频繁地标记,以便一次签出/更新将使整个系统(包括我的两个目录)保持最新。不幸的是事实并非如此。

但我需要系统的其余部分是最新的。我不能只

在根目录下发出“cvs upd -r SORT_OF_CURRENT_TAG”,因为这可能会妥协 如果 SORT_OF_CURRENT_TAG 落后于我的代码部分。

CVS 中有没有一种方法可以让我对系统的一部分进行更新并保持其余部分(我的部分)完好无损?

感谢

赵斌

I am working on a project where I am responsible for 2 subcomponents. The project has many developers and the whole structure is organized by directory hierarchies where a root contains all the rest of the system. We use CVS.

Since my job is focused only on the two directories, I just need to update all the rest with the CURRENT tag. There is this one guy who issues the CURRENT tag for the whole project. Ideally my two subcomponents should be tagged as often as possible such that one single checkout/update will bring the whole system including my two directories up-to-date. Unfortunately that's not the case.

But I need the rest part of system to be up-to-date. I can not just issue

'cvs upd -r SORT_OF_CURRENT_TAG' at the root dir since this will probably compromise
my part of the code if SORT_OF_CURRENT_TAG is behind.

Is there a way in CVS by which I can do an update on part of the system and leave the rest(my part) intact?

Thanks

Bin Zhao

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温柔嚣张 2024-11-08 20:14:07

我想最简单的方法就是简单地更新所有内容(请注意,这不会破坏库中任何未提交的更改)。在根目录中执行以下操作:

cvs up -r CURRENT_TAG

然后将两个目录更新为所需的版本或 HEAD,例如:

cvs up -r rel-2-0 whole_project/lib/mylibrary1
cvs up -A whole_project/lib/mylibrary2

更优雅的解决方案是为要更新的项目部分定义别名。为此,您需要在文件 CVSROOT/modules 中创建一个条目,例如:

my_alias -a !whole_project/lib/mylibrary1 !whole_project/lib/mylibrary1 whole_project

现在您可以简单地从根目录进行更新:

cvs up -r CURRENT_TAG my_alias

I guess the easiest would be to simply update everything (note that this will not destroy any uncommited changes in your libraries). In the root directory do:

cvs up -r CURRENT_TAG

And after that you update your two directories to the version you want or the HEAD, e.g.:

cvs up -r rel-2-0 whole_project/lib/mylibrary1
cvs up -A whole_project/lib/mylibrary2

A more elegant solution would be to define an alias for the portion of the project, which you want to update. For this you would need to create an entry in the file CVSROOT/modules, e.g.:

my_alias -a !whole_project/lib/mylibrary1 !whole_project/lib/mylibrary1 whole_project

Now you can simply update like this from your root directory:

cvs up -r CURRENT_TAG my_alias
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文