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 Hows207Since your project would likely have more than <strong>on</strong>e time in its life that itwould be handed off to QA, some people will put date informati<strong>on</strong> in the tag,for example, QA_2003_07_15. Others will use a simple tag, such as QA, butsuch a tag may need to be reused.If you’ve put down a tag and decide that you no l<strong>on</strong>ger want that tag(for example, your product is preparing for a new QA cycle and you want toreuse last cycle’s tag, or maybe you simply misspelled your tag), you can deleteit using the -d opti<strong>on</strong>.WARNINGOnce you delete a tag, it’s g<strong>on</strong>e forever. It is not available even when you recallearlier versi<strong>on</strong>s. If you reuse a deleted tag, it doesn’t remember any history fromits first use.Imagine your project has just reached a milest<strong>on</strong>e, like the hand-off to QA,so you have tagged your source accordingly. Now the QA group finds a bug andyou fix it. What do you do with the tag? The tag will be <strong>on</strong> the unfixed versi<strong>on</strong>of source. One thing that you can do, after you commit your changes, is simplyto move the label:$ cvs commit Account.java...$ cvs tag -F QA Account.javaThis will “force” the tag <strong>on</strong> Account.java to move to the current versi<strong>on</strong>.Such a mechanism works fine for the short term, for quick changes thatare put in shortly after the tag has been set down. But what if it takes QA severaldays to find the bug, and what if, during that time, you’ve been refactoringAccount.java, or adding features for a future release? In those cases, what youreally need is a branching tag.8.2.9 Branching TagsWhen you use the -b opti<strong>on</strong> with a cvs tag command, then the tag you createis a “branching” tag. That means that you now have two paths in your sourcerepository. You can check out source from, and commit changes to, either ofthose paths. This allows you to keep moving ahead with new development <strong>on</strong>the head or tip of the source while providing fixes against a previous versi<strong>on</strong>.

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

Saved successfully!

Ooh no, something went wrong!