diffcr

Compares configuration records created by clearmake, omake, or clearaudit

APPLICABILITY


Product

Command Type

ClearCase


cleartool subcommand


Attache


command


Platform

UNIX


Windows

SYNOPSIS

diffcr [ -r·ecurse | -fla·t ] [ -sel·ect do-leaf-pattern ] [ -ci ] [ -typ·e { f | d | l } ... ]

[ -ele·ment_only ] [ -vie·w_only ] [ -cri·tical_only ] [ -nam·e tail-pattern ]
[ -wd ] [ -nxn·ame ] [ -fol·low ] [ -l·ong | -s·hort ] do-pname-1 do-pname-2

DESCRIPTION

The diffcr command compares the configuration records (CRs) of two derived objects. A CR is produced by clearmake, clearaudit, and omake when they finish executing a build script in a dynamic view. By comparing CRs, you can determine these differences:

NOTE: Not all of this information is available from configuration records of DOs created by clearaudit.

The do-pname arguments specify the derived objects to be compared. You can specify a derived object in these ways:

You can compare a nonshareable DO in your view to a nonshareable DO created in another view, but you must use a view-extended pathname to specify the DO in the other view.

diffcr supports the same filter and report style options as the catcr command. This means that you can restrict the comparison to particular subtargets of the do-pnames, control which objects appear in the listing, select how pathnames are displayed, and expand the listing to include comments and other supplementary information. See the catcr reference page for additional information.

DOs in Unavailable Views

diffcr maintains a cache of tags of inaccessible views. For each view-tag, the command records the time of the first unsuccessful contact. Before trying to access a view, the command checks the cache. If the view's tag is not listed in the cache, the command tries to contact the view. If the view's tag is listed in the cache, the command compares the time elapsed since the last attempt with the timeout period specified by the CCASE_DNVW_RETRY environment variable. If the elapsed time is greater than the timeout period, the command removes the view-tag from the cache and tries to contact the view again.

The default timeout period is 60 minutes. To specify a different timeout period, set CCASE_DNVW_RETRY to another integer value (representing minutes). To disable the cache, set CCASE_DNVW_RETRY to 0.

RESTRICTIONS

None.

OPTIONS AND ARGUMENTS

COMPARING DIFFERENCES IN SUBTARGETS.  Default: diffcr compares the CRs for do-pname-1 and do-pname-2 only, not for any of their subtargets.

-r·ecurse

Compares the CRs of the two specified derived objects, and their common subtargets. Each pair of CRs is compared separately. By default, a recursive comparison does not descend into DO versions; use -ci to override this.
-fla·t

Similar to -recurse, but consolidates the CRs for each do-pname-n into a single list, with no duplicates, and then compares the lists. The report includes file system objects only; no headers, variables and options, or build scripts. It also includes the total number of times each object was referenced during the build, and the first target in which that object was referenced (First seen in target).
-sel·ect do-leaf-pattern

Starts the comparison at the subtargets of do-pname that match do-leaf-pattern (which can include pattern-matching characters; see the ClearCase wildcards_ccase or Attache wildcards reference page). This option is useful for focusing on a particular object (for example, object module hello.obj) that was built as part of a larger object (for example, executable hello.exe).
-ci (for use with -recurse or -flat only)

Descends into the CRs of DO versions that were used as build sources.

SPECIFYING KINDS OF OBJECTS TO DISPLAY.  Default for UNIX systems: diffcr reports on all objects in the CRs, which may include source files, directories, and symbolic links; derived objects; makefiles; view-private files, and non-MVFS objects that were explicitly declared as dependencies.

Default for Windows systems: diffcr reports on all objects in the CRs, which may include source files and directories; derived objects; makefiles; view-private files, and (for builds performed with omake) non-MVFS objects that were explicitly declared as dependencies.

-typ·e { f | d | l } ...

Lists file-system objects of a particular kind: files (f) directories (d), or links (l). The default value varies with the report style: normal and short listings (-short) default to f; long listings (-long) default to fdl. You may specify multiple kinds of objects by grouping them into a single argument; -type fd, for example.
-ele·ment_only

Lists versions of elements only, including checked-out versions. This option excludes from the listing derived objects (except DO versions), view-private files and directories, UNIX symbolic links, and non-MVFS objects.
-vie·w_only

Lists view-private objects only, including checked-out versions of elements. If you specify this option along with -element_only, the listing includes only checked-out versions of elements.
-cri·tical_only

Excludes from the listing any differences in objects marked as "noncritical" in the CR. Objects with that property typically have it because the user specified them as dependents of the .NO_DO_FOR_SIBLING special target in a clearmake or an omake makefile.
-nam·e tail-pattern

Considers the entry for a file system object only if its final pathname component matches the specified pattern. See the ClearCase wildcards_ccase or Attache wildcards reference page for a list of pattern-matching characters.

CONTROLLING REPORT APPEARANCE.  Default: diffcr reports, in three sections, on MVFS objects, variables and options, and the build script. The report uses full pathnames, and it omits comments and directory versions.

-wd

Lists pathnames relative to the current working directory, rather than as full pathnames.
-nxn·ame

Lists simple pathnames for MVFS objects, rather than version-extended pathnames or DO-IDs.
-fol·low

Lists the link targets only (that is, suppresses printing of the link text).
-l·ong

Expands the report to include the kinds of objects in the CR, and comments. For example, an object may be listed as a version, a directory version, or derived object (see ls -long for a complete list). Comments indicate whether an object is in a makefile, a referenced derived object, or a new derived object.
-s·hort

Restricts the report to file-system objects only (omits header information, variables and options, and build scripts).

SPECIFYING THE DERIVED OBJECTS.  Default: None.

do-pname-1, do-pname-2

Standard pathnames and/or DO-IDs of two derived objects to be compared. Either or both can be a DO version.

EXAMPLES

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.

SEE ALSO

catcr, clearaudit, clearmake, ls, lsdo, make, rmdo, wildcards, wildcards_ccase