Local History: Diff Viewer
See Also
The IDE's Diff Viewer enables you to select previously saved versions of a file
and compare them with the current file version. You can use the Diff Viewer to
view two versions side by side using color coding to emphasize the differences
between the versions being compared.
You access the Diff Viewer by selecting a file (e.g. from the Projects or Files
window) and choosing Show Local History.
- This menu item is active only when previously saved versions of the file exist.
The upper pane of the Diff Viewer presents you with a table depicting all available
versions of the selected file:
- Version. Lists the version of the file, based on the date
which the file was saved. Versions are listed chronologically, with the most
recent version at the top.
- Label. Lists any label associated with the file.
- You can use labels as metadata for file versions. To add a label to
a specific file version, click on the version row beneath the Label
column and type in a label directly.
You can view differences between two file versions by selecting a version from
the table in the upper pane of the Diff Viewer. When you select a version, the
table row becomes highlighted in dark gray, and the selected version displays
on the left side in the Diff Viewer below. The right side of the Diff Viewer
displays the current file version.
- From the table in the upper pane of the Diff Viewer, you can call commands
directly on versions using the right-click menu:
- Revert from History. Revert your current file to
the selected version.
- Delete from History. Delete the selected version
from the Local History repository.
The following UI components facilitate navigation among and promote visibility of
differences between file versions.
- You can navigate among individual differences between file versions using the
following buttons in the toolbar:
- Previous (
).
Highlights the previous difference found between versions.
- Next (
).
Hightlights the next difference found between versions.
- Differences in files are highlighted using the following colors:
- Blue
( ).
Indicates lines that have been changed since the earlier revision.
- Green
( ).
Indicates lines that have been added since the earlier revision.
- Red
( ).
Indicates lines that have been removed since the earlier revision.
- The following icons enable you to make changes directly within the Diff Viewer:
- Replace (
).
Inserts the highlighted text from the previous revision into the current revision.
- Move All (
).
Reverts the file's current version to the state of the selected previous version.
- Remove (
).
Removes the highlighted text from the current version so that it mirrors the previous version.
- The above color settings used to denote version differences are set by default
within the IDE. You can modify these settings by choosing Tools > Options from
the main menu, then clicking Fonts & Colors. In the Diff tab, you can select the colors of
your choice.
- See Also
- Adjusting Local History Settings
- Local History Tasks: Quick Reference
- About the IDE's CVS Support
- About the IDE's Subversion Support
Legal Notices