Java Reference
In-Depth Information
8.3 Using IDEA's Local History
One limitation of CVS and other version control systems is that they can only
track changes between committed versions of your code. If you try several differ-
ent implementations on your own machine before finally committing one, there's
no way to track these incremental differences should you change your mind. A
similar problem occurs when you make that one last change before committing,
only to find you've broken something else in the process. The undo mechanism
can only go so far back, and it won't survive exiting IDEA or an unexpected crash.
This is where the IDEA 's Local History saves the day.
8.3.1
Understanding IDEA's Local History
IDEA augments its support for popular version control systems with something it
calls the Local History . Local History is basically a personal, real-time version con-
trol system that operates alongside your traditional version control system. The
Local History automatically tracks any changes to your code as you edit, com-
pile, and test—allowing you to restore or refer back to changes you've made
along the way.
How Local History differs from your normal version control system
Local History wasn't designed to replace your
primary version control system—it doesn't
support shared access, and it doesn't store
changes forever (just a few days by default).
Rather, it was designed as a companion to
your existing version control system. Use of
another system isn't required, however;
you're free to use Local History by itself. Just
note the limitations discussed in this chapter.
Enabling Local History
To turn on Local History, open IDE Settings
and select the Local History control panel, as
shown in figure 8.20. Select the Enable Local
History checkbox to turn it on. Under His-
tory , enter the number of days for changes
you want to keep. The more days you allow,
the larger the cache IDEA must keep on your
Figure 8.20 The Local History
configuration settings alter the
behavior of your own personal
version control system.
 
 
 
 
 
Search WWH ::




Custom Search