2003 TextMaestro Technologies






Main Toolbar


Session Toolbar


FTP Toolbar


File Attributes


Project Manager


Account Manager


Browse Remote


Text Conversion Dialog


Text Conversion Attributes


Text Conversion Libraries


Text Conversion Rules


Text Conversion Batch Mode


Text Conversion Command Line






Cross Listings


Program Options


Save Program Data


16. Diff And Merge

TextMaestro offers a set of comfortable features to perform diff, merge and cross. Below is the technical description of these features.

(0) Getting Started

(a) Various Diffs

(b) Diff Display and Master File palette

(c) Summary of buttons


(0) Getting Started: Typically you drag-and-drop the files, of which you want to create the diffs, onto the application's main file list.

Then click on from Main toolbar to Open Session toolbar as shown below.

Then click on  Diff and Merge (Alt+D) button:

The following dialog will appear. In summary, you can perform 2 things here, namely, 1. Diff and Merge, and 2. Cross.


1. Diff and Merge is performed between 2 or more files. The following buttons are intended for diff and merge activities:


2. Cross is a utility to analyze two lists and generate a report on what items belong to what list exclusively and commonly. The following buttons for Cross.

, , ,



(a) Various Diffs:

There are 3 ways you can perform a diff.

(1) 3-Way diff by hitting


(Used among three files. (Alt+3))


(2) Quick diff by hitting


(Used between two files. (Alt+2))


(3) Quick diff by hitting


(Used between Input and Output windows. (Alt+1))

(1) Select 3 files in the main list and hit 3-Way diff   button  (Alt+3), and the following window will appear:

(2) At any time, select two files in the main list and hit Quick diff button (Alt+2) and the diff result will pop up in a diff pane as shown below:

(3) Place text on Input window and some other text on Output window. Then hit Quick diff button (Alt+1) and the diff result will pop up in a diff pane as shown below:


(b) Diff Display and Master File Palette:

Consider the diff between two files shown on a Quick Diff pane below:

  • Per convention, left list of a diff pane contains text of old file, and right list that of new file. Each line may have one of these five icons:

No icon

Normal. Corresponding lines from left and right are the same.

Deleted. Expect to find this icon on the left. The line has been deleted from the file.

Changed. Expect to find this icon on both sides. The line has been modified.

Added. Expect to find this icon on the right. The line has been added to the file.

The line has been added or inserted into the Master File as part of the merging process. This line is regarded as resolved case.

  • The Down and Up arrow let you to hop to next and previous issues (, , or ) when you have Trace all checked. If Trace all is not checked, the hop skips the resolved cases of the right.

  • Each side above has the following pop up menu upon right click, which allows you to transfer line(s) from current list to the Master File palette, and perform related actions.

Alternatively, you can simply  drag  line(s) from either list and  drop  them onto Master File palette. This process adds the dragged lines into Master File at the drop location.

If you hold down the control key while dragging, then the process inserts the dragged lines into that many lines of the Master File starting at the drop location.


  • Description of the columns:

Column 1:

This column displays the icon.

Column 2:

The second column, albeit a thin column, which is identified by a red rectangle above, contains the sequential line number, which you can see, if you expand the column. This column is sometimes (not always) very much needed, especially when the files are extremely large, and too much line-expansion takes place from the diff analysis. For left and right, this column should display exactly the same number. If it does not, you have likely mismatched the heights of the two sides to review something of your interest. Typically the left vertical scroll bar forces you to remain on parallel heights.

Column 3:

The third column denotes the actual line number in the file. This number may vary for the left and right. If the two files contain Addition and Deletion marks, then you can expect discrepancies for this column.

Column 4:

The actual line from the file in raw text format. Tab is shown as tab.


If you click on button, The Master File palette appears as shown below:


  • The file that participates in diffs is called variant. One of the variants, usually variant 1, is regarded as parent or base of the diff-and-merge process in hand. Often we accept variant 1 as the Master File and bring all the changes between it and other variants individually.

The order of variants is determined by the order they are listed in the main file list.

  • As a rule of thumb, you want to study all the diffs, and decide which variant should be drag-and-dropped (or loaded by button) onto Master File palette. After the variant, i.e., file is loaded here each line assumes icon to denote a basic normal state. Then based on your activities, a line here may have one of the following states, and thus a distinct icon:


Normal state of a line. That is how it is loaded from the file.

Added from variant i. What it means is, user must have dragged this line from variant i, and added it here. For example, above indicates that this line came from variant 2 (file 2).

Overridden/inserted from variant i. What it means is, user must have dragged this line from variant i while holding down the control key, and replaced existing line of Master File with the imported line. For example, above indicates that this line came from variant 2 (file 2), and it had actually replaced an existing line here.




If you double click on a line, Edit Master Palette appears with the line in it. (See below). If you make any changes to this text, a mod flag will appear next to the icon when you return to the palette. (See line 11 above).

You may select multiple lines and hit edit pad button to open the edit pad. In that case all the selected lines will be present on the edit pad.

If edit pad opens with n lines, and you happen to add one or more lines to the existing text, then the new lines are added after last selection in Master File palette. Those edit pad added lines assume this icon.


Move to next issue. (F1)

Move to previous issue. (F2)

Browse for a file that needs to be loaded onto the Master File palette.

Save the contents of Master File palette to a local file. The file will be automatically added to the main TextMaestro file list.

Open edit pad to edit currently selected lines.

Delete selected lines from Master File palette.

Go To certain line in Master File palette.

Find text in Master File palette.

Open text conversion library.

Execute macros of current conversion library on Master Palette text.


Comment: From Master Palette the following pop up menu is available upon right click.

Note the command Convert using Library above. After you select a library by using the button, open above pop up menu, and select this command. This will convert all the text of Master Palette using the selected library, and modified lines will be marked with a new icon. Similar to this pop up menu access, you can simply hit the Convert button.

This is the quickest way to make global find-and-replace changes on Master Palette text.

Displays description of various icons used in diff and mege windows.


An example of Edit Master Palette:

An example of Find Text dialog, which opens by double-click, or Find Text button:


An example of Left and Right Lines dialog, which opens from right-click, or Ctrl+Q:

This is useful when you want to scrutinize the difference between two alike lines.

Summary of buttons:

3-Way diff

This generates 3-way diff among three selected files. Note, the first selected file is placed at the center, the second at the left and the third at the right.

Quick diff

This Quick diff button allows you to obtain a diff between any two files selected in the main file list. (If more than two files are selected, first two selected files are considered the arguments).

This is useful when you want to just diff two files on demand as you are building the master file. Typically you take the changes (add or override) from various variants to the Master File palette, and save the Master File palette intermediately. Then you might like to perform quick diff between the master file and the exporting variant to verify that exported changes are indeed correct.

Quick diff

This Quick diff button is used to obtain a diff between the texts found in Input and Output windows.

Display palette for Master file

Opens the palette where you construct the Master File by merging changes from various diff panes. The Master File palette is shown below.

Hide all diff panes

Allows you to close all diff panes at once. Panes are closed but not destroyed. Therefore, next load is quick.



Match case

Matches/ignores case while performing diff analysis.

Match ident

Matches/ignores ident (blanks and tabs) before and after each line.



Resets the diff engine and diff tree, destroys all diff windows, and clears all memory from heap that were utilized to build the diff data structure.

It is note worthy that for two files, each of 250K lines (~10 MB size), the diff facility consumes about 1/2 G RAM.



Closes the diff manager and all diff windows.