13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

210Chapter 8Know What You Have: CVShave two different source versi<strong>on</strong>s; bug fixes have to be made in both sources,new features have to be added twice, and so <strong>on</strong>.The easiest way to deal with that is to keep your number of active branchtags small; you likely d<strong>on</strong>’t want to have to apply a fix to 14 differentbranches. Also, keep the lifespan of the branches brief—which is, of course, arelative term.CVS does provide commands to merge a branch back into the source head.But for this, we will refer you to other CVS material. Our job is to give you anoverview and a feel for the possibilities. For this sort of task you will want acomplete reference manual.For more variati<strong>on</strong>s <strong>on</strong> cvs tag, type:$ cvs tag --help8.2.10 cvs exportIf you want to produce a copy of your source tree without the CVS subdirectories—justthe pure source—you can use the cvs export command. Like theinverse of import, it will check out a copy of the source, but will not create anyof the CVS subdirectories that allow CVS to manage the commits, checkouts,logging, status, tags, and so <strong>on</strong>. In other words, the exported directories are nota CVS sandbox—they’re just a copy of the files.NOTEChanges made to an exported collecti<strong>on</strong> of files cannot be committed back toCVS. Of course you can get the changes back into CVS by creating a sandboxwith a cvs checkout command, copying all or some of the exported files intothat sandbox, and then committing the changes from there. But it’s better tothink of export as a <strong>on</strong>e-way street.8.2.11 A Quick Look behind the ScenesIf you are <strong>on</strong>e of those people who worry excessively about efficiency, let us reassureyou that CVS is OK. You could think of a CVS repository as saving eachrevisi<strong>on</strong> of a file (for example, versi<strong>on</strong>s 1.1, 1.2, and 1.3), but in fact CVS <strong>on</strong>lykeeps a single full versi<strong>on</strong> of a file—the latest versi<strong>on</strong>—and then stores thedeltas, that is, changes required to revert back to the previous versi<strong>on</strong>s. So itkeeps a full versi<strong>on</strong> of 1.3, but then <strong>on</strong>ly the differences between 1.3 and 1.2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!