Copies ClearCase data to a different VOB
Product | Command Type |
---|---|
ClearCase | command |
Platform |
---|
UNIX |
Windows |
The clearexport_ccase utility plays a central role in cross-VOB maintenance by copying VOB objects from one VOB to another, specifically:
Elements
All the elements and links cataloged within a directory
A hierarchy of directories, file elements, and VOB symbolic links
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.
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.
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. |
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:
Look up each label or branch to determine whether it has been translated previously. If a match is found, the current name is translated the same way.
Record each translation of a new label or branch for use in future lookups.
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.
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.
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.
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.
SELECTIVE CONVERSION OF FILES. Default: clearexport_ccase processes all elements it encounters.
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 |
|
|
|
|
|
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.
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.
STORAGE LOCATION OF DATAFILE. Default: clearexport_ccase creates datafile cvt_data in the current working directory.
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.
|
|
Create entries in the datafile for the entire tree under directory element src, exporting important versions created before 1999 and all versions created since the beginning of 1999.
clearexport_ccase -r -I 1-Jan-1999 src
Create entries in the datafile for the elements in the current working directory, but not in any subdirectories; store the datafile in a file named newcvt.
clearexport_ccase -o newcvt .
clearexport_*, clearimport, events_ccase, relocate, rcs(1), rsh(1) or remsh(1), sccs(1)
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |