UsingLibrariesInCVS
Including 3rd party code in CVS
How merge to HEAD is done: Let's say we want to import the excellent database abstraction layer ADOdb version 4.60 into our CVS repository:
ADOdb:
$ wget http://phplens.com/lens/dl/adodb360.tgz $ tar xvzf adodb360.tgz $ rm adodb360.tgz $ cd adodb $ cvs import -m 'Imported ADOdb 4.60' _adodb PHPLENS_COM R4_60 $ cd .. $ rm -fr adodb
Now, we're going to check it out from CVS and fix a bug we found:
$ cvs checkout _adodb $ cd _adodb ...hack, chop, whittle... $ cvs commit -m "Fixed bug #12345: Replace doesn't use native REPLACE command, if available" $ cd .. $ rm -fr _adodb
Now, we want to upgrade to version 4.62:
$ wget http://phplens.com/lens/dl/adodb462.tgz $ tar xvzf adodb462.tgz $ rm adodb462.tgz $ cd adodb $ cvs import -m 'Imported ADOdb 4.62' _adodb PHPLENS_COM R4_62
This command completed successfully, but reported the following:
1 conflicts created by this import. Use the following command to help the merge: cvs checkout -j -jR4_62 _adodb
So, let's delete the imported directory ...
$ cd .. $ rm -fr adodb
... and checkout as instructed above
$ cvs checkout -jR4_60 -jR4_62 _adodb Manually resolve any conflicts that were reported
Now, let's commit our 4.60 changes into 4.62:
$ cvs commit -m 'Merged our 4.60 changes into 4.62'
And finally remove our directory:
$ rm -fr _adodb
Comments