xcleardiff

Compares or merges text files graphically

APPLICABILITY


Product

Command Type

ClearCase


command


ClearCase LT


command


Platform

UNIX

SYNOPSIS

xcleardiff [ -b·lank_ignore ] [ -tin·y ] [-html ] [ -hst·ack | -vst·ack ] [ X-options ] pname1 pname2 ...
xcleardiff -out output-pname [ -bas·e pname ] [ -tin·y ] [ -html ]

[ -hst·ack | -vst·ack ]
[ -q·uery | -qal·l | -abo·rt ] [ X-options ] contrib-pname ...

DESCRIPTION

xcleardiff is a graphical diff and merge utility for text files. It implements the xcompare and xmerge methods for the text_file and compressed_text_file type managers, as well as the graphical portions of these methods for the directory and _html type managers. On color display monitors, xcleardiff uses different colors to highlight changes, insertions, and deletions from one or more contributing files. During merge operations, contributors are processed incrementally and, when necessary, interactively, to visibly construct a merge results file. You can edit this ts file directly in the merge results pane as it is being built to add, delete, or change code manually, or to add comments.

xcleardiff is implemented as an X Window System application using a standard Motif toolkit. See your X Window System documentation for a description of general mouse and keyboard conventions.

INVOKING xcleardiff

You can invoke xcleardiff directly from the command line, specifying files or versions to compare or merge. Invoking xcleardiff directly bypasses the type managers, so invoke xcleardiff directly only when you are working with text files that are not stored in a VOB.

The following cleartool subcommands, when applied to text files, also invoke xcleardiff:

The findmerge command includes the advantage of some extra command options-optional preprocessing-in the same way that diff and merge offer more flexibility than direct calls to the character-based cleardiff utility. See findmerge -ftag, for example.

Various buttons and commands in the xclearcase graphical interface also invoke xcleardiff.

NOTE: When comparing/merging HTML files, if the machine on which you execute xcleardiff is not the machine on which you run your HTML browser, your browser may not be able to find the pathname to the files being compared/merged.

CHANGING THE DEFAULT HTML BROWSER

xcleardiff invokes a script to determine which HTML browser to use when comparing or merging files of type html. By default, xcleardiff invokes the Netscape browser through the script display_url.sh. To change the default values, use the following environment variables:

CCASE_WEB_SCRIPT (Default value: $ATRIAHOME/etc/display_url.sh)

Invokes the script specified, which designates the browser to use.
CCASE_NETSCAPE (Default value: "netscape")

Changes the default version of the Netscape browser to the specified version. If the Netscape browser is accessible through $PATH, you need only specify the executable name; if it is not in your path specification, you must specify a full pathname.
CCASE_NETSCAPE_OPT (Default value: NULL)

Provides additional command-line options to the Netscape browser through the script, for example, -install to force the Netscape browser to use a private colormap.

RESTRICTIONS

See the diff and merge reference pages.

OPTIONS AND ARGUMENTS

HANDLING OF WHITE SPACE.  Default: When comparing files, xcleardiff pays attention to changes in white space.

-b·lank_ignore

(Valid only when comparing files, not when merging) Causes xcleardiff to ignore extra white space characters in text lines: leading and trailing white space is ignored; internal runs of white-space characters are treated like a single <SPACE> character.
FONT SIZEDefault: xcleardiff uses the font specified by the resource xcleardiff*diffFontSet.
-tin·y

Uses a smaller font, to increase the amount of text displayed in each pane.

INVOKING THE TYPE MANAGER FOR HTML FILES. Default: When xcleardiff is invoked directly, the type manager is bypassed. When xcleardiff is invoked indirectly (through cleartool or the graphical interface), the type manager is used.

-html

Starts the _html type manager.

CONTRIBUTOR PANE STACKING.  Default: Each of the two or more files being compared or merged is displayed in a separate subwindow, or contributor pane. By default, these panes are displayed, or stacked, horizontally (side by side), with the base contributor on the left.

-vst·ack

Stacks the contributor panes vertically, with the base contributor at the top.
-hst·ack

Displays the contributor panes horizontally (the default behavior).

MERGE RESULTS FILE.  Default: None. You must specify a merge results file with the -out option.

-out output-pname

(Merge only; required) Specifies the merge results file, either a checked-out version or a standard operating-system file.

SPECIFYING A BASE CONTRIBUTOR FOR A MERGE OPERATION.  Default: xcleardiff does not calculate a base contributor (see the merge reference page). The first contributor named on the command line becomes the base contributor, against which the one or more additional contributors are compared. Query on All mode (-qall) is in effect by default, but can be deactivated from the graphical interface.

-bas·e pname

(merge only) Makes pname the base contributor for a merge. Using -base turns off "Query on All" mode, unless -qall is explicitly supplied. See also Merge Automation.

MERGE AUTOMATION.  Default: If you do not specify a base contributor with -base, Query on All mode is enabled. In this mode, xcleardiff prompts you to accept or reject each change, insertion, or deletion found in contributors 2 through n on the command line. The options described in this subsection have no effect.

If you specify a base contributor with -base, xcleardiff performs the merge automatically, prompting only if two or more contributors modify the same section of the base contributor. If all changes can be merged automatically, xcleardiff prompts you before saving the merge results file.

-q·uery
-qal·l
-abo·rt (mutually exclusive)

-query turns off automatic merging for nontrivial merges (where two or more contributors differ from the base file) and prompts you to proceed with every change in the from-versions. Changes in the to-version are accepted unless a conflict exists.
-qall turns off automatic acceptance of changes in which only one contributor differs from the base file. In this mode, xcleardiff prompts you to accept or reject each modification (relative to the base file) in each contributor, as it does when two or more contributors differ from the base contributor. You can switch this mode interactively during the xcleardiff session.
-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 would require user interaction.

X WINDOW SYSTEM OPTIONS.  Default: None.

X-options

xcleardiff accepts all the standard X Toolkit command-line options (for example, -display), as described in the X(1) reference page. If the option string includes white space, enclose it in quotes.

DIFF/MERGE CONTRIBUTORS.  Default: None. You must specify at least two files for a diff operation, and at least one file for a merge operation (two, if a base contributor is not supplied with -base).

contrib-pname ...

The files to be compared or merged. If a merge operation does not explicitly include a base contributor with -base, the first contrib-pname becomes the base contributor. For a diff operation, xcleardiff does not calculate a common ancestor (see the diff reference page); the first contrib-pname is the base contributor against which subsequent contributors are compared.

EXAMPLES

SEE ALSO

cleardiff, diff, merge, schemes, type_manager