Java Reference
In-Depth Information
8.2.3
Committing your changes
When you're finished making changes, you should commit them to the repository
for safekeeping. Each time you commit your changes, the version control system
increments the revision number.
To commit a single file, right-click,
and select CVS | Commit to bring up
the Commit File dialog (assuming you
haven't turned it off). You're prompted
for a log message, as shown in fig-
ure 8.12, which is stored in the reposi-
tory's log to indicate the purpose of
the changes. The option to not show
this dialog in the future turns off the
dialog and uses the last specified
options for future commits. This is
equivalent to deselecting the Commit
command in the Version Control configuration panel we reviewed earlier. Click
OK to commit your file. There's a chance that someone has already committed
changes to this file since the last time you updated your copy, especially if you
don't update often; if there is a conflict, you'll get an error message requiring you
to perform an update before committing your changes.
The two options Reformat code and Optimize imports make it easy to keep
your code clean and conformant. If the reformatting option is enabled, IDEA
uses its code-formatting tool ( To o l s | R e f o r m a t C o d e , Ctrl+Alt+L ) to normal-
ize your code layout according to your current code style settings, as discussed
in chapter 12. Likewise, you can optimize your list of imported packages, just as
if you'd executed the Tools | Optimize Imports ( Ctrl+Alt+O ) command prior
to check in.
Figure 8.12 When committing a file to CVS
within IDEA, you have the option of running a last-
minute code reformat and import optimization.
The Reformat Code and Optimize Imports commands were moved from the
To o l s menu to the Code menu in IDEA 5.0.
Similarly, you can commit changes to several files at once by Ctrl -selecting them
from the project or source browser. Or, you can commit an entire directory at
once; IDEA recursively commits its contents in one easy step. In most cases, how-
ever, it's simpler to use the Commit Project command, discussed later.
 
 
 
 
 
 
 
Search WWH ::




Custom Search