IBM® Rational® Rhapsody® DiffMerge basic syntax is the diffmerge.exe command with the options described in the following table.
Diffmerge.exe <options>
For example, to create a base-aware comparison or merge that includes the subunits (-recursive) and specifies the output file in C:\Radio_Merge\Radio.rpy you might use the following code:
Diffmerge.exe -merge -recursive C:\Radio_Main\Radio.rpy C:\Radio_Branch\Radio.rpy -base C:\Radio_Base\Radio.rpy -out C:\Radio_Merge\Radio.rpy
The following table lists the command‑line options.
| Option | Description | Syntax |
|---|---|---|
| -base <filename> | Specifies the name of the file that is the common ancestor of the two compared files (file1 and file2) for a base-aware comparison, as described in Results displayed for compare of three units. | Diffmerge.exe -base <base file
name> <file1> <file2> -compare |
| -compare | Starts Rational Rhapsody DiffMerge in
Compare mode for two units, but does not display the interface. (To
start a compare and display the interface, use the -xcompare command.) Graphical mode executes the comparison and then exits to the system prompt. The results of the comparison are as follows: 0 = identical IBM Rational Rhapsody units 1 = differences between the two units were identified You can retrieve this result by the using ERRORLEVEL MSDOS variable; for example, echo Exit code = %ERRORLEVEL% |
Diffmerge.exe <file1> <file2> -compare |
| -diffReport <Difference Report file> | Writes all the text in the Difference Report tab
to the specified file. For more information, see Generating difference reports. Use this option only when using ‑compare or ‑merge, otherwise -DiffReport will not be executed. |
Diffmerge.exe -compare <file1> <file2> ‑diffReport <filename>
Diffmerge.exe -merge <file1> <file2> |
| -merge | Starts Rational Rhapsody DiffMerge in
merge mode, but does not display the interface. (To start a merge
and display the interface, use the -xmerge command.) If Rational Rhapsody DiffMerge detects a merge conflict, the merge action stops and the tool returns a 1 exit code. You can retrieve this result by using the ERRORLEVEL MSDOS variable; for example, echo Exit code = %ERRORLEVEL% If the merge can be completed automatically (without conflicts), the merged unit is saved using the file named in the -out command. If no -out command is specified, the Save window opens, and you can enter a name for the new file. |
Diffmerge.exe <file1> <file2> ‑base <file0> ‑merge |
| -mergeLog <Merge Activity Log file> | Writes all the text in the Merge Activity Log tab
to the specified file. For more information, see Viewing the merge activity log. If the file does not exist, Rational Rhapsody DiffMerge creates the file. If it exists, the new information is appended to the existing file. Use this option only when using ‑merge; otherwise ‑mergeLog will not run. |
Diffmerge.exe ‑merge <file1> <file2> ‑base <file0> ‑mergeLog <filename> |
| -mergeReport <Merge Report file> | Writes all the text in the Merge Report tab
to the specified file. For more information, see Producing merge reports. If the file does not exist, Rational Rhapsody DiffMerge creates the file. If it exists, the new information is appended to the existing file. Use only when using -merge, otherwise ‑mergeReport will not be executed. |
Diffmerge.exe ‑merge <file1> <file2> ‑base <file0> ‑mergeReport <filename> |
| -out <fileName> | Replaces the Save merge as option with an option to save the merge results to the specified file. | Diffmerge.exe <file1> <file2> -out <filename> |
| -recursive | Compares with subunits. Rational Rhapsody DiffMerge loads the subunit files automatically. By default, the tool compares without the subunits. | Diffmerge.exe <file1> <file2> -recursive |
| -xcompare | Starts Rational Rhapsody DiffMerge in Compare mode and displays the interface. | Diffmerge.exe <file1> <file2> -xcompare |
| -xmerge | Starts Rational Rhapsody DiffMerge in Merge mode and displays the interface. | Diffmerge.exe <file1> <file2> -xmerge |