Product | Command Type |
---|---|
ClearCase | command |
ClearCase LT | command |
Platform |
---|
UNIX |
Windows |
UNIX only-Compare files:
UNIX only-Merge files:
Windows only-Compare files:
Windows only-Merge files:
cleardiff is a line-oriented file comparison and merge utility with a character-based user interface. It can process up to 32 files. Alternative interfaces to cleardiff are:
All platforms: cleardiff can be invoked with the cleartool diff command to perform a file comparison, or with the cleartool merge subcommand to perform a merge.
UNIX only: ClearCase and ClearCase LT include a corresponding GUI tool, xcleardiff. This tool can be invoked with the diff -graphical and merge -graphical subcommands and through xclearcase.
NOTE: You cannot compare directory versions with cleardiff; you must use diff. (The diff command first analyzes the directory versions, then calls cleardiff, using the type manager mechanism.)
See the diff and merge reference pages for discussions of how files are compared and merged.
NOTE: Any of the following options can be invoked with the diff -options or merge -options commands.
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.The UNIX examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.
The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.
In cleartool single-command mode, cmd-context represents the UNIX shell or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt. In Attache, cmd-context represents the workspace prompt.
NOTE: In the UNIX examples that follow, arguments and output that show multicomponent VOB tags are not applicable to ClearCase LT, which recognizes only single-component VOB tags. In this manual, a multicomponent VOB tag is by convention a two-component VOB tag of the form /vobs/vob-tag-leaf-for example, /vobs/src. A single-component VOB tag consists of a leaf only-for example, /src. In all other respects, the examples are valid for ClearCase LT.
Compare the current version of an element with a scratch copy in your home directory.
z:\myvob>
cleardiff msg.c C:\users\susan\msg.c.tmp
********************************
<<< file 1: msg.c
>>> file 2: C:\users\susan\msg.c.tmp
********************************
------------[changed 5]--------|-----------[changed to 5]------------
static char msg[256]; | static char msg[BUFSIZ];
-|-
-----------[changed 9-11]------|-----------[changed to 9]------------
env_user(), | env_user(), env_home(), e+
env_home(), |-
env_time() ); |
-|
Compare the same files, this time in a separate window and using a small font.
% cleardiff -tiny msg.c ~/msg.c.tmp
Compare the most recent versions on two branches of an element.
y:\lib_vob>
cleardiff util.c@@\main\LATEST util.c@@\main\rel2_bugfix\LATEST
diff, diff(1), merge, type_manager, xcleardiff
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |