Comparing projects

Default compare tools are predefined by Rational® Synergy for both the CLI and the GUI. The default compare tool for the GUI is interactive, and the one for the CLI is automatic. The compare tool shows the differences between different versions of projects.

The default compare tool is specified in the ccm.properties file as follows, for UNIX and Windows, respectively.

Additionally, you can set encoding rules in the ccm.properties file so that compared projects display in the correct encoding, as follows:

// Command to compare projects on UNIX and its checkstatus.
ccm.cli.tools.compare.project.unix=%ccm_home/bin/util/cc_dff %ccm_home %{encoding[null='CP1252']} %outfile %project1 %project2^M
// Command to compare projects on Windows and its checkstatus.
ccm.cli.tools.compare.project.windows="%ccm_home\\\\bin\\\\util\\\\cc_dff.bat" "%ccm_home" %{encoding[null='CP1252']} %outfile %project1 %project2

The second parameter to the ccm_diff command allows you to specify an encoding for the project being compared. The syntax “%{encoding[null='CP1252']}” is interpreted as follows:

If the project specifies a work area encoding with the encoding_rules attribute, use that encoding for the compare. If not, use the CP1252 encoding. (See File encodings for a discussion of the encoding_rules attribute.)

You can specify a default encoding other than CP1252 for this parameter. For example, the following syntax indicates to use the UTF8 encoding if an encoding is not specified on the project:

ccm.cli.tools.compare.project.windows="%ccm_home\\\\bin\\\\util\\\\cc_dff.bat" "%ccm_home" %{encoding[null='UTF8']} %outfile %project1 %project2

The following syntax indicates to always use the CP1252 encoding:

ccm.cli.tools.compare.project.windows="%ccm_home\\\\bin\\\\util\\\\cc_dff.bat" "%ccm_home" CP1252 %outfile %project1 %project2

The valid encodings are CP1252, UTF8, BIG5, eucJP, EUC-KR, SJIS, and GB18030.

The projects being compared and the ancestor project must have the same encoding.

For example, in a Chinese-language database, you might set the following encoding rules for the project type:

Server-encoding: GB18030
Unix-wa-encoding: GB18030
Windows-wa-encoding: GB18030

Assuming the default encoding parameters for the ccm_diff command were used, the CLI and GUI compare tools are then invoked with the GB18030 encoding.

Alternatively, if your site contains only Chinese-language databases, you can change the default compare command as follows, and then encoding_rules attributes are not required on the project type.

ccm.cli.tools.compare.project.windows="%ccm_home\\\\bin\\\\util\\\\cc_dff.bat" "%ccm_home" %{encoding[null='GB18030']} %outfile %project1 %project2

About this task

ccm diff  [-vc|-versioncompare -p|-project
    project_spec1 [project_spec2]
project_spec1
project_spec1 specifies the first project to be compared. You can set project_spec1 to a Project specification for one project.
project_spec2
project_spec2 specifies the second project to be compared. You can set project_spec2 to a Project specification for one project.

Feedback