Compares or merges text files graphically
Product | Command Type |
---|---|
ClearCase | command |
ClearCase LT | command |
Platform |
---|
UNIX |
Compare files:
Merge files:
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.
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.
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:
NULL
) See the diff and merge reference pages.
HANDLING OF WHITE SPACE. Default: When comparing files, xcleardiff pays attention to changes in white space.
xcleardiff*diffFontSet
.
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.
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.
MERGE RESULTS FILE. Default: None. You must specify a merge results file with the -out option.
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.
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.
X WINDOW SYSTEM OPTIONS. Default: None.
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).
Compare two files in different directories.
% xcleardiff test.c ~jpb/my_proj/test_NEW.c
Compare two HTML files and invoke the type manager for HTML files.
% xcleardiff -html my_new_source.html my_old_source.html
cleardiff, diff, merge, schemes, type_manager
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |