Hi, I would like to know what the CVS methodology is for handling resources which are shared between projects.
This seems like a common problem and I'm sure there are solutions which I'm unaware of and I hope you will point me in the right direction. 1. SEPARATE TREE APPROACH One approach which has been suggested is to have separate CVS trees for shared resources. CVS_REPOSITORY shared resource tree - contains shared resources project 1 tree - uses shared resources project 2 tree - uses shared resources WORKING COPIES shared resource tree - contains shared resources project 1 tree - references the shared resources somehow project 2 tree - references the shared resources somehow How can the project trees reference the shared resources without the use of symbolic links to the shared resources. or by referring to the shared resources by full pathnames? The problem with this approach is that there will be no version information for the shared resources in the project trees, because the shared resources are CVSed separately. This seems to negate the value of using CVS to take a snapshot of the entire project tree, since the state of the shared resources is indeterminate based on the information in the project tree. I suppose you could tag the project and shared resource trees to keep them in sync, but this method depends on the user being careful. And the situation is worse if there are multiple shared resource trees. And between major commits, the state of the shared resource tree is unknown. 2. REPOSITORY LINKS APPROACH Another solution is to have symbolic links in the repository. CVS_REPOSITORY shared resource tree - contains MODELS directory full of shared files project 1 tree - after creating initial project tree, edit repository and replace MODELS directory by a symbolic link to the MODELS directory in the shared resource tree project 2 tree - likewise WORKING COPIES shared resource tree - contains MODELS directory full of shared files project 1 tree - contains MODELS directory full of shared files project 2 tree - contains MODELS directory full of shared files This solution avoids symbolic links in the user's project trees and moves them to the CVS repository. What are the drawbacks to this solution? I have briefly tested this solution and it doesn't break CVS as far as I can tell. If the shared resources are modified in any of the trees, the other trees all see the changes due to the links in the repository. The version information for the shared resources is CVSed along with the rest of the project trees, avoiding a drawback to the separate tree solution. Users do not have to be careful to maintain separate trees at the appropriate level. This approach does require manually editting the repository, although the change should be transparent to the user. However, being a new CVS user, I am worried that there is some subtle problem which I am not aware of which may result from editing and using symbolic links in the repository. What approach do YOU use to handle shared resources? I would appreciate comments from experienced CVS users. Harlan _______________________________________________ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs