mecleardiffmerge

Compares or merges text files that are in different character encodings

Applicability

Product

Command type

VersionVault

command

Platform

UNIX®

Linux®

Windows®

Synopsis

  • Compare files:
    mecleardiffmerge[ –dif/f_format | –ser/ial_format | –col/umns n ]

    [ –hea/ders_only | –qui/et | –sta/tus_only ] [ –b/lank_ignore ]

    [ –encoding enc1,enc2... ] [ –abortpname1 pname2 ...
  • Merge files:
    mecleardiffmerge –out output-pname [ –bas/e pname ]
    [ –q/uery | –qal/l | –qnt/rivial | –abo/rt ]

    [ –dif/f_format | –ser/ial_format | –col/umns n ]

    [ –hea/ders_only | –qui/et | –sta/tus_only ] [ –b/lank_ignore ]

    [ –out_enc output_encoding ] [ –encoding enc1,enc2,... ] [–favor/_contrib n (base=1,...) ] pname1 pname2 ...

Description

mecleardiffmerge (multiencoding comparison and merging) is a line-oriented file comparison and merge utility with a character-based user interface. You specify the character encodings of the files by providing the canonical names of the character sets. This command can process up to 32 files. You cannot compare directory versions using this tool; instead, you must use diff. For discussions of how files are compared and merged, see the diff and merge reference pages.

If you do not specify the encodings in the command line, you are prompted for them. For the first query for an encoding, the default value is 'UTF-8'. A user-specified encoding becomes the default value for the query for the encoding of the next file. An error is returned if an invalid or unsupported character encoding value is specified or if the contributor can not be read with the specified encoding.

The character encodings list that is supported on the current Java Virtual Machine (JVM) can be displayed by specifying <str+?> at the query prompt. The interface then changes to the encoding-display mode and encodings starting with <str> are displayed. Anything specified after the first occurrence of '?' is ignored. Specify '?' to display the complete list of supported encodings on the current JVM. You can exit display mode by displaying all the encodings in the list or by specifying case-insensitive <q> at the display mode prompt. You are returned to encoding query mode after exiting display mode and can specify the appropriate encoding at the encoding query prompt.

Options and arguments

–dif/f_format | –ser/ial_format | –col/umns n
–diff_format reports both headers and differences in the same style as the UNIX® and Linux® diff command, and suppresses the file summary from the beginning of the report.

–serial_format reports differences with each line containing output from a single file, instead of using a side-by-side format.

–columns establishes the width of a side-by-side report. The default width is 80 (that is, only the first 40 or so characters of corresponding difference lines appear). If n does not exceed the default width, this option is ignored.

–hea/ders_only | –qui/et | –sta/tus_only
–headers_only lists only the header line of each difference. The difference lines themselves are omitted.

–quiet suppresses the file summary from the beginning of the report.

–status_only suppresses all output, returning only an exit status: a 0 status indicates that no differences were found; a 1 status indicates that one or more differences were found. This option is useful in shell scripts.

–b/lank_ignore
When comparing and merging files, ignores extra white space characters in text lines: leading and trailing white space is ignored altogether; internal runs of white space characters are treated like a single <SPACE> character.
–out output-pname
Stores the output of a merge in file output-pname. This file is not used for input, and must not already exist.
–out_enc output-encoding
This option is used along with –out option only. Specifies the character encoding for the merge output. If you do not specify the output encoding, you are queried for the value (unless –abort is specified). An error is thrown if an invalid or unsupported encoding value is specified.
–bas/e pname
Makes file pname the base contributor for the comparison or merge. If you omit this option, the pname1 argument becomes the base contributor, and the comparison or merge automatically runs with the –qall option invoked.
-favor/_contrib n (base=1,...)
(merge only) Specifies the contributor, in numeric value, to be used to fill in the non-changed areas of the merge output file. This option is only valid when both the –b/lank_ignore option is used. If this option is not specified, the base contributor is used.
–q/uery | –qal/l | –qnt/rivial | –abo/rt
–query prompts you for confirmation before proceeding with each change in the from-versions. Changes in the to-version are automatically accepted unless a conflict exists.

–qall turns off automatic acceptance of changes in which only one contributor differs from the base contributor. utfxcleardiff prompts for confirmation of such changes, as it does when two or more contributors differ from the base contributor.

–qnt/rivial turns off automated merging and prompts you to determine whether you want to proceed except in the case where a trivial merge (branch copy) would be done.

–abort is intended for use with scripts or batch jobs that involve merges. It allows completely automatic merges to proceed, but aborts any merge that requires user interaction.

pname1 pname2 ...
The pathnames of contributors to compare or merge. These can be view-extended or version-extended path names. Only one such argument is required if you also specify a file with the –base option.