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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.2 Source C<strong>on</strong>trol: Whys and Hows201or since a certain date:$ cvs diff -D 06-Sep-03 Account.java8.2.4 UpdateIf there are other people working <strong>on</strong> this project with you, they will also bemaking changes. To bring there changes into your sandbox, run the cvsupdate command:$ cvs updatecvs server: Updating .P Account.javaM User.javacvs server: Updating subdirHere, P indicates CVS has patched in changes to that source file; and Mindicates you have modified the file. Note that Xyz.java is not menti<strong>on</strong>ed.That means there were no updates involved.The subdirectory subdir was also updated, but no changes were made.Had a change been made, you would see the modified files menti<strong>on</strong>ed by name.You can update a single file at a time by naming that file <strong>on</strong> the commandline, but typically you want to get the changes for all the files in a directory, oreven all the changes throughout the project, since a change in <strong>on</strong>e file may bedependent <strong>on</strong> changes in other files.Sometimes when you try to commit your changes you will be told that thecommit did not succeed because <strong>on</strong>e or more of your files was not up to date.Not to worry; it’s easy to bring your files up to date. This leads directly intoour next topic. Read <strong>on</strong>!8.2.5 MergesWhen you commit changes, a new versi<strong>on</strong> of each changed file is now part ofthe repository. If some<strong>on</strong>e else commits changes, that pers<strong>on</strong>’s changes are nowpart of the repository as well. But those changes (unlike your own local changes)are yet to appear in your own local copy of the files, that is your sandbox.The following CVS command will bring your files up to date with all thechanges made since you checked out your copy (or last did an update):$ cvs update

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

Saved successfully!

Ooh no, something went wrong!