Re: cvs issue about sync checkout/checkin between two modules.

Todd Denniston <[email protected]>
Newsgroups gmane.comp.version-control.cvs.general
Message-ID <[email protected]>
Marco wrote, On 10/30/2008 02:16 AM:
 > Hi all
 > Can someone give me some advices how to do below ruquest?
 >
 > Two modules: A and B
 > one file: f
 > f exists in A and B.
 >
 > upgrade f, check in to A or B not (A and B).
 > whenever check out A or B, the f is synced most current one.

chaitu wrote, On 10/30/2008 05:38 AM:
> Hi Marco,
> 
> AFAIK, this can be done only by writing a wrapper check-in program/
> script which is coded to commit to both branches (if you omit B, it
> will detect and take care automatically.....you have to code it to
> consider a list of modules you want to be in sync, like "A B C ...").
> All your check-ins must be done through this script and not directly
> cvs commit command.
> 
> Anyone else knows a better way?
> 
> - Chaitanya
> 

The usual suggestion is to make a third module/directory C, which contains 
files that have been in common between A and B, then in the 
$CVSROOT/CVSROOT/modules file setup modules within modules, i.e., :
ProjA	&A &C
ProjB	&B &C

after that you have to update the makefiles in A & B (now ProjA & ProjB) to 
either point to where the files are in the new sandboxes (VPATH could be 
helpful here), or build C independently as a lib that A and B use.

-- 
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.