6. Diff, Merge, and Change Palette : Editing a File Using the Diff Tool

Editing a File Using the Diff Tool
In addition to comparing two versions of a file, the Diff tool can help you to edit the contents of the version in your workspace. This "edit-by-diff" capability is available only when you're comparing your workspace version with another version; it's not available when you invoke the Diff tool from the Version Browser or History Browser.
Here's a procedure for using this capability (see the toolbar button summary below):
1.
2.
Click the Show result of edits button in the Diff toolbar. This opens a third pane (the Edit pane), which initially contains the same text as your workspace version.
3.
Click the Revert my change toolbar button to swap in the "before" version's text at that point (a change, addition, or deletion). The button becomes highlighted to indicate your selection.
Include both the "before" and "after" versions' text at that point: click the Revert My Change toolbar button, then hold down the Ctrl key and click the Restore my change toolbar button.
You can then modify the combined text manually.
Change your mind about a difference section where you've used and/or , by selecting that section and clicking one of those buttons. Any manual edits you've made in that difference section are lost.
Click the Revert all of my changes button to make the Edit pane the same as the "before" version.
Click the Restore all of my changes button to make the Edit pane the same as the "after" version.
4.
Click the Save edits and close toolbar button. This simply replaces the file in your workspace. (It doesn't perform an AccuRev Keep command.)
Note: Edit-by-Diff vs. Merge
Using the edit-by-diff capability is similar to using the Merge Tool (see The Merge Tool on page 229). But there's an important difference:
Diff Toolbar Edit-by-Diff Buttons
Revert my change
Use the "before" version's section at this point. If the button is currently highlighted, you can hold down the Ctrl key and press to append the "before" section to the workspace version's section.
Restore my change
Use the workspace version's section at this point. If the button is currently highlighted, you can hold down the Ctrl key and press to append the workspace version's section to the "before" section.
Revert all my changes
Make the Edit pane the same as the "before" version.
Restore all my changes
Make the Edit pane the same as the "after" version.
Save edits and close
Store the current contents of the Edit pane in the workspace's file, without performing a Keep operation.

AccuRev, Inc.
Phone: 781-861-8700
Fax: 781-861-8704
support@accurev.com