Share common projects with two different projects in CVS


Share common projects with two different projects in CVS If there are two or more projects in the repository, some of the files are common in these two projects and some are different.How to share the files that are same between these projects? How can archive this? How Changes in common files be reflected to both projects. Version of CVS 2.5.03  

Answer: The CVSROOT/modules2 file or the older CVSROOT/modules file can help with this sort of thing:  

Generally the best CM independent solution is to organise your project source code hierarchy within the CM tool in such a way that ‘common’code is in a project/module/directory of it’s own so it can be checked out and managed independently of other projects, ie:  




Then you define a module where ‘projecta’ = ‘proja’+’common’ so when a person does ‘cvs co projecta’ they  get: 



If your server is running on Linux then you can ‘cheat’ by simply symbolically linking the RCS file into two directories (though this may cause locking conflicts if the files are very busy).   

Thanks to:Arthur Barrett 

Tagged : / / / / / / / / / / / / / / / / /