File Menu
Redo Diff : Run diff again on the same files.
Open Both : Select two files, run diff.
Open Left File : Select a file for left window, run diff
Open Right File : Select a file for right window, run diff
Open Conflict File: Select a file containing conflicts such as from
a CVS merge.
Open Patch File : Display a patch file created by diff -c or diff -u.
RCSDiff : (UNIX only) Select one file and diff like rcsdiff.
CVSDiff : (UNIX only) Select one file and diff like cvs diff.
Print : Experimental print function.
It currently creates a postscript file ~/tcldiff.ps
Quit : Guess
Options Menu
Font : Select font and fontsize for the two main text windows
Ignore : Diff options for handling whitespace
Parse : Additional parsing made by diff.tcl to improve the display.
See examples below.
Nothing: No parsing made.
Lines : When there is a changed block with the same number
of lines in both right and left files, diff.tcl
compares corresponding lines and tries to highlight
only the part that has been changed.
Blocks : When the number of lines in a changed block is not
the same in both files, diff.tcl tries to find lines
that look the same and place them abreast. The "small"
version do not parse big blocks to avoid long runs.
The Char and Word options selects if the line parsing should
highlight full words only, or check single characters.
2nd stage : More thorough parsing of a line.
Mark last : Last change of a line is underlined
Colours : Choose highlight colours.
Diffs only : Only differing lines will be displayed.
Force crlf translation : (Windows only) Use crlf mode when reading files.
Save default: Save current option settings in ~/.diffrc
Diff Options Field: Any text written here will be passed to diff.
In RCS/CVS mode, any -r options will be used internally
to select versions.
Prev Diff Button: Scrolls to the previous differing block, or to the top
if there are no more diffs.
Next Diff Button: Scrolls to the next differing block, or to the bottom
if there are no more diffs.
Equal sign: Above the vertical scrollbar, a "=" will appear if the files
are equal. While the external diff executes a "*" is shown
and is replaced with "=" or "" before the files are displayed
to give that information early.
Up, Down, Page Up and Page Down scrolls main windows.
Escape takes focus out of text windows.
Right mouse button "zooms" a line of text. If the text under the cursor
is selected, a menu appears where the selected text can be used for a
separate diff.
Ctrl-s starts incremental search. Incremental search is stopped by Escape
or Ctrl-g.
Ctrl-f brings up search dialog. F3 is "search again".
Left mouse click on the line number of a diff highlights it.
Right mouse click on the line number of a diff gives a menu where it can
be selected for separate diff. This can be used to check a block that has
been moved.
Merge Window (Appears in conflict mode)
You can, for each difference, select which version you want to appear
in the output file. The buttons "LR", "L", "R" and "RL" select the
lines from the left file, right file or both files.
"Prev" and "Next" buttons moves between differences.
"All L" and "All R" buttons select "L" or "R" for all differences.
"Pure" ...
"Save" saves the merge result to a file.
On the keyboard, Up and Down keys means the same as "Prev" and "Next".
Left and Right keys selects "L" and "R".
When saved it is the contents of the text widget that is saved which
means you can hand edit there if you are careful. E.g. you can't use
cursor keys, but you can type text, delete text and copy/paste with
mouse assistance.
Examples of effects of parse options.
Below are two example files, and five different results when using
different options with those files.
Left file: Right file:
NET '/I$1/N$1454' IC2-15 IC5-7 NET '/I$1/N$1454' IC1-4 IC2-15 IC5-2 IC5-7
NET '/I$1/N$1455' IC2-14 IC6-8 NET '/I$1/N$1456' IC2-12
NET '/I$1/N$1456' IC2-13 IC2-12 NET '/I$1/N$1457' IC2-11 IC6-7
NET '/I$1/N$1457' IC2-11 IC6-7 NET '/I$1/N$1458' IC2-9
NET '/I$1/N$1458' IC2-10
Example 1. No parsing.
1: NET '/I$1/N$1454' IC2-15 IC5-7 1: NET '/I$1/N$1454' IC1-4 IC2-15 IC5-2 IC5-7
2: NET '/I$1/N$1455' IC2-14 IC6-8 2: NET '/I$1/N$1456' IC2-12
3: NET '/I$1/N$1456' IC2-13 IC2-12
4: NET '/I$1/N$1457' IC2-11 IC6-7 3: NET '/I$1/N$1457' IC2-11 IC6-7
5: NET '/I$1/N$1458' IC2-10 4: NET '/I$1/N$1458' IC2-9
Example 2. Lines and characters
1: NET '/I$1/N$1454' IC2-15 IC5-7 1: NET '/I$1/N$1454' IC1-4 IC2-15 IC5-2 IC5-7
2: NET '/I$1/N$1455' IC2-14 IC6-8 2: NET '/I$1/N$1456' IC2-12
3: NET '/I$1/N$1456' IC2-13 IC2-12
4: NET '/I$1/N$1457' IC2-11 IC6-7 3: NET '/I$1/N$1457' IC2-11 IC6-7
5: NET '/I$1/N$1458' IC2-10 4: NET '/I$1/N$1458' IC2-9
Example 3. Blocks and characters
1: NET '/I$1/N$1454' IC2-15 IC5-7 1: NET '/I$1/N$1454' IC1-4 IC2-15 IC5-2 IC5-7
2: NET '/I$1/N$1455' IC2-14 IC6-8
3: NET '/I$1/N$1456' IC2-13 IC2-12 2: NET '/I$1/N$1456' IC2-12
4: NET '/I$1/N$1457' IC2-11 IC6-7 3: NET '/I$1/N$1457' IC2-11 IC6-7
5: NET '/I$1/N$1458' IC2-10 4: NET '/I$1/N$1458' IC2-9
Example 4. Blocks and words
1: NET '/I$1/N$1454' IC2-15 IC5-7 1: NET '/I$1/N$1454' IC1-4 IC2-15 IC5-2 IC5-7
2: NET '/I$1/N$1455' IC2-14 IC6-8
3: NET '/I$1/N$1456' IC2-13 IC2-12 2: NET '/I$1/N$1456' IC2-12
4: NET '/I$1/N$1457' IC2-11 IC6-7 3: NET '/I$1/N$1457' IC2-11 IC6-7
5: NET '/I$1/N$1458' IC2-10 4: NET '/I$1/N$1458' IC2-9
Example 5. Blocks, words and 2nd stage
1: NET '/I$1/N$1454' IC2-15 IC5-7 1: NET '/I$1/N$1454' IC1-4 IC2-15 IC5-2 IC5-7
2: NET '/I$1/N$1455' IC2-14 IC6-8 "\n" ""
3: NET '/I$1/N$1456' IC2-13 IC2-12 2: NET '/I$1/N$1456' IC2-12
4: NET '/I$1/N$1457' IC2-11 IC6-7 3: NET '/I$1/N$1457' IC2-11 IC6-7
5: NET '/I$1/N$1458' IC2-10 4: NET '/I$1/N$1458' IC2-9