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.

8.2 Source C<strong>on</strong>trol: Whys and Hows209Example 8.3 Checking out a tagged revisi<strong>on</strong>$ cd$ mkdir fixes$ cd fixes$ cvs co -r QA myprojectcvs checkout: Updating myproject...U myproject/Account.javaU myproject/Caltr<strong>on</strong>.javaU myproject/Demo.javaU myproject/Employee.javaU myproject/Pers<strong>on</strong>.java...$ cd myproject$ cvs status Account.java===================================================================File: Account.java Status: Up-to-date$Working revisi<strong>on</strong>: 1.2 Sat Oct 26 03:32:17 2002Repository revisi<strong>on</strong>: 1.2 /usr/local/srctree/myproject/Account.java,vSticky Tag: QA (branch: 1.2.2)Sticky Date:(n<strong>on</strong>e)Sticky Opti<strong>on</strong>s: (n<strong>on</strong>e)Now that you have the label set down, you need to check out a copy ofthat versi<strong>on</strong> of the source. Since we are checking out a new copy, be sure thatyour CVSROOT envir<strong>on</strong>ment variable is set appropriately (see above). Then findsome new directory to put your source and check out a copy with the tag, asshown in Example 8.3.We did a cvs status after the checkout to show you the important differencebetween this versi<strong>on</strong> and the other versi<strong>on</strong>s. These files will all show aSticky Tag in their status. This is the label used to check out or update thisversi<strong>on</strong> of the source. When you check in changes to these source files, thechanges will be against that branch, and not the head.From there <strong>on</strong>, everything is the same. Make your changes and just checkfiles in as usual. CVS will remember (via the files in the CVS directory) thatyou’re <strong>on</strong> the branch, so when you check things in, they’ll go to the branch.The important thing is to create the tag as a branch tag so that you cancommit changes against that branch. The downside, however, is that you now

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

Saved successfully!

Ooh no, something went wrong!