blob: 8ead8329539fa4ba5acd138e5cf6d5dc210359bb [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<title>Local history</title>
</HEAD>
<BODY BGCOLOR="#ffffff">
<h2>
Local history</h2>
<P CLASS="Para"> Every time an editable file is saved in the Workbench, the Workbench
updates the local history of that file and logs the changes that have been made.
The local history of a file can then be accessed and a previously saved copy
of the file can be reverted to, as long as the desired state is recent enough
in the save history.</P>
<ol>
<li>
<P CLASS="Para">
Create a new file named sampleFile.txt.</P>
</li>
<li>
<P CLASS="Para">
In the editor for sampleFile.txt modify the resource by adding the line
&quot;change1&quot; and saving the file.</P>
</li>
<li>Repeat this by entering a new line &quot;change2&quot; and saving it again.
</li>
<li>Add
a third line &quot;change3&quot; and save it again. </li>
<li>
<P CLASS="Para">
From the resource's context menu in one of the navigation views, select <b>Replace With &gt; Local History</b>.</P>
</li>
<li>
<P CLASS="Para">The Replace from Local History dialog opens and shows the
previous local history&nbsp; of the file.</P>
<P CLASS="Para">&nbsp;<img src="../images/Image81_local.png" alt="Local history" border="0" ></P>
<P CLASS="Para">The left pane of the dialog contains the Workbench's copy
of the file. The figure above shows that the Workbench contains the copy
with all 3 lines - the same copy that is currently shown in the editor area
of the Workbench.&nbsp;<br>
&nbsp;</P>
<P CLASS="Para">The first item in the local history (see above) contains the
last saved copy of the file. This is the one with only two lines of text. The
final entry in the tree is the first copy of the file.<br>
&nbsp;</P>
<P CLASS="Para">The bottom area of the dialog displays the differences between
the Workbench file and the specific copy of the file selected in the local
history.&nbsp;&nbsp;</P>
</li>
<li>Select the first item (shown above) in the local history. The right pane should
show one line of text.&nbsp; </li>
<li>
<P CLASS="Para">Click <b>Replace</b>. This replaces the Workbench's copy of
sampleFile.txt with the chosen local history item.</P>
</li>
<li>
<P CLASS="Para">Observe that the sampleFile.txt editor now contains two
lines.&nbsp;</P>
</li>
</ol>
</BODY>
</HTML>