开发者

How to do a partial CVS update

开发者 https://www.devze.com 2023-02-25 00:12 出处:网络
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 o

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 gu开发者_开发知识库y 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


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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号