When merging directories, the merge tool automatically accounts for both additions to and deletions from both directories in a new, controlled, merged directory.
If an object to be merged is a member of your project, Rational Synergy uses the new merged object in the project.An area "in conflict" occurs when both versions have changes in the same place relative to the common ancestor. If your merged file contains any conflicts, the tool marks the conflicts so you can find them quickly and easily. The tool then writes the merge results to the new file.
The following example shows how the merged file is marked:
<<<<<<<file1 filename1
conflicting
lines in file1
=======
conflicting lines
in file2
>>>>>>>file2 filename2
The default merge tool is specified in the ccm.properties file for UNIX and Windows. You can specify a different merge tool for each object type. The specified merge tool applies to the specified type and any subtype without a specified merge tool. By default, only the ASCII file type has a merge tool defined.
Additionally, you can set encoding rules in the ccm.properties file so that merged files display in the correct encoding, as follows:
// Command to perform merge of source objects on UNIX and its checkstatus.
ccm.cli.tools.merge.ascii.unix=%ccm_home/bin/util/cc_merge %ccm_home %{encoding[null='CP1252']} %outfile %file1 %ancestor %file2^M
// Command to perform merge of source objects on Windows and its checkstatus.
ccm.cli.tools.merge.ascii.windows="%ccm_home\\\\bin\\\\util\\\\cc_merge.bat" "%ccm_home" %{encoding[null='CP1252']} %outfile %file1 %ancestor %file2
The second parameter to the ccm_merge command allows you to specify an encoding for the file being merged. The syntax “%{encoding[null='CP1252']}” is interpreted as follows:
If the object type specifies a work area encoding with the encoding_rules attribute, use that encoding for the merge. 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 object type:
ccm.cli.tools.merge.ascii.windows="%ccm_home\\\\bin\\\\util\\\\cc_merge.bat" "%ccm_home" %{encoding[null='UTF8']} %outfile %file1 %ancestor %file2
The following syntax indicates to always use the CP1252 encoding:
ccm.cli.tools.merge.ascii.windows="%ccm_home\\\\bin\\\\util\\\\cc_merge.bat" "%ccm_home" CP1252 %outfile %file1 %ancestor %file2
The valid encodings are CP1252, UTF8, BIG5, eucJP, EUC-KR, SJIS, and GB18030.
The files being merged and the ancestor file must have the same encoding.
For example, in a Chinese-language database, you might set the following encoding rules for the ascii type:
Server-encoding: GB18030
Unix-wa-encoding: GB18030
Windows-wa-encoding: GB18030
Assuming the default encoding parameters for the ccm_merge command were used, the CLI and GUI merge tools are then invoked with the GB18030 encoding.
Alternatively, if your site contains only Chinese-language databases, you can change the default merge command as follows, and encoding_rules attributes are not required on the ascii type.
ccm.cli.tools.merge.ascii.windows="%ccm_home\\\\bin\\\\util\\\\cc_merge.bat" "%ccm_home" %{encoding[null='GB18030']} %outfile %file1 %ancestor %file2
ccm merge [[-create_task] | [-t|-task task_spec]]
[-c|-comment comment_string]
[-ce|-commentedit] [-cf|-commentfile file_path]
file_spec1 file_spec2
You can use this option with -commentedit and -commentfile. If you use the -commentedit option, the comment displays in the default text editor.
The task is assigned to the user who performed the merge. The release value of a task is set to the release value of the project in which the new object version is created. If the object version is created outside of a project, the release value is not set.