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.

198Chapter 8Know What You Have: CVSyour source. You should never need to mess with the files in the CVS directory;see the Cederqvist reference in Secti<strong>on</strong> 8.6 for more informati<strong>on</strong> aboutthese files.8.2.3 Normal UseThe typical use of CVS occurs after you’ve made some changes to your sourcecode. At some point, typically after the code compiles cleanly or after thechanges have been tested to some extent, you will want to commit your changesto the CVS repository. When you commit <strong>on</strong>e or more files, they become thelatest versi<strong>on</strong>, the versi<strong>on</strong> that others get when they checkout or update themodule. To say it another way, when you commit, you make those changes apermanent part of the source repository, available to others.You can commit a single file at a time, like this:$ cvs commit Account.javaOr you can commit several files at a time, like this:$ cvs commit Account.java User.java Xyz.javaOr you can commit all the changes from a certain point in the filesystemhierarchy (e.g., the current directory) <strong>on</strong> down, like this:$ cvs commit(Specifying no files implies the current directory. You can also name a directoryexplicitly.)When you commit changes, CVS wants you to provide a bit of commentaryto explain what you’ve changed, to say something about this new versi<strong>on</strong>.The comment can be supplied <strong>on</strong> the command line, with the -m opti<strong>on</strong>:$ cvs commit -m "bug fix"If you d<strong>on</strong>’t provide the -m parameter and its argument, CVS will invokeyour favorite editor (as specified in the envir<strong>on</strong>ment variable CVSEDITOR orVISUAL or else EDITOR, in that order of precedence). The default, <strong>on</strong> <strong>Linux</strong>systems, is to invoke vi (see Figure 8.2). In the editor, you can type <strong>on</strong>e or morelines of text; when you exit, the commit will c<strong>on</strong>tinue to completi<strong>on</strong>.

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

Saved successfully!

Ooh no, something went wrong!