Opening a Merge Window


diffmerge [-caption=caption] [-merge] [-result=resultfile] [-ro2] [-shex] [-t1=title1] [-t2=title2] [-t3=title3] {file1} {file2} {file3}

Open a File Merge Window with the 3 given files. File1 will appear in the left panel and is traditionally set to your version of the file. File2 will appear in the center panel and should be the common ancestor of the other 2 files. File3 will appear in the right panel and is traditionally set to the repository version of the file.

If you do not specify /ro2, file2 will be editable and you can apply patches to it from file1 or file3.


-m, -merge

Runs Auto-Merge immediately after loading the files.

-r, -result=pathname

Specifies a pathname for saving the merge result. It omitted, the merge result (if saved) will overwrite the center file. This flag causes DiffMerge to return an exit status based upon the merge result in the window.

-t3, -title3=message

Sets the File Panel Lable for the third file/column.

The meanings of the other flags are described in the Flags for Opening a Diff Window.

Exit Status

When /result is not used, DiffMerge exits with exit status OK (0) or SYNTAX-ERROR (3) as usual.

When /result is used, DiffMerge sets the exit status to reflect the state of the merge:

0:   MERGE-RESOLVED - you saved the merge result. This does not mean that there are no conflicts remaining; it only means that you looked at the files, made whatever edits were necessary, and saved your edits into the result file.

1:   MERGE-ABORTED - you gave up the merge by not saving your changes. This means that you either never saved your edits into the result file or that you closed the window with unsaved edits (possibly after a checkpoint save).

2:   FILE-ERROR - there were file errors/problems that prevented the merge window from being shown.

3:   SYNTAX-ERROR - there were syntax errors with the command line arguments.