CVS handling shared files

Derek Neighbors plug-devel@lists.PLUG.phoenix.az.us
Fri Jul 12 17:35:02 2002


> 1. I import ProjectA (it has all the files), for example, into the repository.
> 2. I create the needed sandbox directory and files for ProjectC (without 
> 3.c) and import it into the repository.
> 3. I replace the file /cvsroot/ProjectC/1.c,v in the repository with link 
> to the ProjectA file by deleting the ProjectC/1.c,v file and using the 
> command "ln -s /cvsroot/ProjectA/1.c,v /cvsroot/ProjectC/1.c,v
> 4. From now on when I checkout ProjectC, I will get a copy of 1.c to my 
> sandbox that actually came from the real file in ProjectA.
> 
> Did I get it?

Without fine toothing syntax the general idea is correct, you should be 
able to co 1.c then from ProjectA or ProjectC and make changes and commit 
and both projects will have the update.

As always, do in a test space first confirm it works, if you run into 
problems let me know.  Its been a while... (isnt that a song) since I have 
had to muck in the black art of fooling cvs. :)

-Derek