clearexport_ccase

Copies ClearCase data to a different VOB

APPLICABILITY


Product

Command Type

ClearCase


command


Platform

UNIX


Windows

SYNOPSIS

clearexport_ccase [ -r ] [ [ -s date-time ] [ -p date-time ] | -I { now | date-time } ]

[ -t temp-dir-pname ] [-T translation-pname ]
[ -o datafile-pname ] [ source-name ... ]

DESCRIPTION

The clearexport_ccase utility plays a central role in cross-VOB maintenance by copying VOB objects from one VOB to another, specifically:

For information on moving elements from one VOB to another or splitting a VOB into two or more VOBs, see relocate.

The copy procedure involves two stages: export and import. During the export stage, you invoke clearexport_ccase in the VOB where the data to be moved resides. clearexport_ccase creates a datafile (by default, named cvt_data), and places in it descriptions of the objects in the VOB (for details, see Table 6).

In the import stage, you invoke clearimport on the datafile. clearimport reads the descriptions in the datafile and imports the information into the new VOB. Use the same config spec (the same view) for both the export and import phases.

NOTE: You can run this command only in a dynamic view. Additionally, you cannot run this command on UNIX and then run clearimport on Windows to import the data, or vice versa. However, you can transfer data in either direction between a UNIX VOB and a Windows VOB by mounting the UNIX VOB on your Windows machine and running both clearexport_ccase and clearimport on the Windows machine.

Contents of the Datafile

Table 6 describes which aspects of objects clearexport_ccase includes in the data file. Not all objects are included in all circumstances; for example, derived objects are not available in snapshot views.

Table 6 ClearCase Items Included in Data File


Item

Description included in data file?

Notes

Directory element


Yes


The datafile includes descriptions only of the elements and cataloged links in the directory version selected by the current view; thus, for example, metadata associated with the directory version is not exported. Even exporting all directories in a VOB may miss the elements not included in the VOB as it is currently seen by the view.


File element


Yes


If the element has a user-defined element type, an error occurs if you invoke clearimport in a VOB in which that element type is not defined. (clearimport makes no effort to verify that the element type is defined the same way in both VOBs.) clearexport_ccase includes in the datafile descriptions of any attributes attached to an element object itself.

By default, clearexport_ccase includes descriptions of all versions in the datafile, but you can specify command options to limit the versions that are included.


Checked-out versions


No


When clearexport_ccase processes a checked-out version, it issues a warning message and does not include a description of the checked-out version in the datafile.


Symbolic links


Yes


UNIX


Checked-in DOs


Yes


Config records of checked-in DOs are copied to the new VOB when you invoke clearimport (ClearCase).


Event records


Yes



Type objects


Yes



Attributes


Yes



Labels


Yes



Hyperlinks


Some


Only hyperlinks that represent merges (hyperlinks of type Merge) are described in the datafile.


Triggers


No



Contents of lost+found directory


See Notes


To include the contents of lost+found in the datafile, make lost+found the current directory, and then run clearexport_ccase.

TRANSLATION OF BRANCHES AND VERSION LABELS

A label type cannot have the same name as a branch type within the same VOB. If clearexport_ccase encounters a label-branch naming conflict, it renames one of them. For example, the label rel2 may become rel2_1. Such renaming can introduce inconsistencies over multiple runs of clearexport_ccase. The same label may be renamed during one run, but not during others. You can enforce consistency by using the same translation file in multiple invocations of clearexport_ccase. If you name such a file, using the -T option, clearexport_ccase uses it to:

The first time you use clearexport_ccase, use -T to create a new translation file. On subsequent invocations of clearexport_ccase, use -T again and specify the same translation file, for consistent name translation.

Syntax of Translation File

The translation file consists of one or more lines in the following form:

{ label | branch } old-name new-name

For example, to rename the branch type pre_import_work to post_import_work and the label BL1.7 to IMPORT_BASE, the translation file contains the lines:

branch pre_import_work post_import_work
label BL1.7 IMPORT_BASE

No blank lines are allowed in the file.

HANDLING OF ELEMENTS THAT CANNOT BE EXPORTED

When clearexport_ccase encounters an element that cannot be exported (for example, a file with format problems or a broken symbolic link), it prints an error and continues. After creating the data file, the command prints a summary of the elements that could not be exported.

RESTRICTIONS

None.

OPTIONS AND ARGUMENTS

HANDLING OF DIRECTORY ARGUMENTS.    Default: The datafile includes the version of a directory or file element currently selected by your view. If you specify a directory as a source-name argument: clearexport_ccase processes the files in that directory but ignores the contents of the subdirectories; and clearimport creates a directory element for source-name and for each of its subdirectories.

-r

clearexport_ccase descends recursively into all source-name arguments that are directories. The recursive descent involves only the currently selected version of each directory element.

SELECTIVE CONVERSION OF FILESDefault: clearexport_ccase processes all elements it encounters.

-s date-time

clearexport_ccase processes only versions modified with new metadata (labels, branches, attributes, and so on.) or created since the specified time. Exception: clearexport_ccase processes a branch created at an old version if one or more new versions exist on the branch. Use this option for regular, incremental updating of an element from another one that is still under development. Be sure to specify a date-time that covers the entire period since the preceding update. In other situations, it is probably better to use -I instead of -s.
NOTE: In an incremental updating situation, if you remove a label or branch from an imported version, clearimport does not remove the label or branch from the target element.
Specify the time in one of the following formats:
date.time | date | time | now
where:

date

:=

day-of-week | long-date

time

:=

h[h]:m[m][:s[s]] [UTC [ [ + | - ]h[h][:m[m] ] ] ]

day-of-week

:=

today |yesterday |Sunday | ... |Saturday |Sun | ... |Sat

long-date

:=

d[d]-month[-[yy]yy]

month

:=

January |... |December |Jan |... |Dec

Specify the time in 24-hour format, relative to the local time zone. If you omit the time, the default value is 00:00:00. If you omit the date, the default is today. If you omit the century, year, or a specific date, the most recent one is used. Specify UTC if you want to resolve the time to the same moment in time regardless of time zone. Use the plus (+) or minus (-) operator to specify a positive or negative offset to the UTC time. If you specify UTC without hour or minute offsets, Greenwich Mean Time (GMT) is used. (Dates before January 1, 1970 Universal Coordinated Time (UTC) are invalid.)
-p date-time

Like -s, but processes only versions modified with new metadata (labels, branches, attributes, and so on) or created prior to the specified time.
-I { now | date-time }

Processes only the important versions of an element, but includes all versions created since the specified time. A version is important if any of these conditions are true:

  • It is the most recent version on its branch.
  • It has a version label.
  • It has an attribute.
  • A subbranch is sprouted from it.
  • Either end of a merge arrow hyperlink is connected to it.

DIRECTORY FOR TEMPORARY FILES. Default on UNIX systems: the value of P_tmpdir (set in the stdio.h system include file; you can override this value by setting the TMPDIR environment variable). Default on Windows systems: the value of the TMP environment variable.

-t temp-dir-pname

Specifies an alternate directory for temporary files. This directory must already exist.

TRANSLATION OF BRANCHES AND LABELS.  Default: As described in the section TRANSLATION OF BRANCHES AND VERSION LABELS, clearexport_ccase may rename a branch or label type to avoid naming conflicts.

-T translation-file

Uses the specified translation file to control conversion of label and branch names.

STORAGE LOCATION OF DATAFILE.  Default: clearexport_ccase creates datafile cvt_data in the current working directory.

-o datafile-pname

Stores the datafile in the specified location. An error occurs if datafile already exists.

SPECIFYING FILES TO BE PROCESSED.  Default: clearexport_ccase processes the current working directory (equivalent to specifying "." as the source-name argument). clearimport creates an element in the target VOB for each element in the current working directory. clearimport creates a directory element in the target VOB for each subdirectory of the current working directory.

source-name ...

One or more pathnames, specifying elements and/or directory versions:

  • For each specified element, clearimport re-creates some or all of its versions.
  • For each specified directory version, clearexport_ccase places descriptions in the datafile for all the elements it catalogs. clearimport either reuses an existing directory (creating a new version if new elements are added) or creates a directory element with a single version for the specified directory itself, and for its subdirectories.
Each source-name must be a simple file or directory name. This enables clearimport to reliably access the source data. Specifying a parent directory (..) causes an error, as does any UNIX pathname that includes a slash or any Windows path that includes a slash or backslash. Thus, before entering this command, change to the directory in or under which the elements to be exported reside.

EXAMPLES

SEE ALSO

clearexport_*, clearimport, events_ccase, relocate, rcs(1), rsh(1) or remsh(1), sccs(1)