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.
1. Invoke the Diff tool in a File Browser, to compare your workspace version with some other ("before") version of the same file.
2. Click theShow 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.
• Click theRevert 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 theRevert My Change toolbar button, then hold down the Ctrl key and click th
e Restore my change toolbar button.
• Alternatively, click the two buttons in the opposite order. Both buttons become highlighted, and number annotations indicate the order you selected:
• Change your mind about a difference section where you've usedand/or
, by selecting that section and clicking one of those buttons. Any manual edits you've made in that difference section are lost.
• Click theRevert all of my changes button to make the Edit pane the same as the "before" version.
• Click theRestore all of my changes button to make the Edit pane the same as the "after" version.
• Click theSave edits and close toolbar button. This simply replaces the file in your workspace. (It doesn't perform an AccuRev Keep command.)
• Using the edit-by-diff capability is similar to using the Merge Tool (see The Merge Tool on page 226). But there's an important difference:
• A merge operation takes into account a third version: the closest common ancestor of the two versions being merged.Use the "before" version's section at this point. If thebutton is currently highlighted, you can hold down the Ctrl key and press
to append the "before" section to the workspace version's section.
Use the workspace version's section at this point. If thebutton is currently highlighted, you can hold down the Ctrl key and press
to append the workspace version's section to the "before" section.
AccuRev, Inc. |
Phone: 781-861-8700 |
Fax: 781-861-8704 |
support@accurev.com |