Converts CVS files to elements
Product | Command Type |
---|---|
ClearCase | command |
ClearCase LT | command |
Platform |
---|
UNIX |
Windows |
The clearexport_cvs command processes Concurrent Versions Systems (CVS) files so they can be imported into ClearCase or ClearCase LT elements and versions. The source data can range from a single file to an entire directory tree.
During the export stage, you invoke clearexport_cvs in the area where the CVS files reside. clearexport_cvs creates a datafile (by default, named cvt_data), and places in it descriptions of elements, branches, and versions. clearexport_cvs follows symbolic links it encounters during the export stage.
In the import stage, you invoke clearimport on the datafile to import information into the new VOB.
clearexport_cvs ignores most information in CVS files that is not related to version-tree structure. clearexport_cvs converts each CVS symbol, which names a revision or branch, into the appropriate construct: version label or branch. You can specify a translation file to control naming, enforcing consistency over multiple invocations of clearexport_cvs. You can use the -S and -V options to preserve CVS state attributes and CVS revision numbers as attributes of the corresponding ClearCase or ClearCase LT versions. The -A option enables you to export CVS Attic subdirectories if you choose to recursively descend source_name arguments that specify directories.
clearexport_cvs and clearimport use magic files to determine which element type to use for each element clearimport creates. For more information on magic files and file typing, see the cc.magic reference page.
NOTE: You cannot run clearexport_cvs on UNIX and then run clearimport on Windows to import the data, or vice-versa. However, you can transfer data in either direction between UNIX and Windows by mounting the UNIX VOB or file-system on the Windows machine and running both clearexport_cvs and clearimport on the Windows machine.
clearexport_cvs works directly with the structured CVS files. It does not process the working files created with co and co -l commands. Be sure to check in working files with the ci command before running the exporter. clearexport_cvs issues warning messages when it encounters checked-out files, but it still processes them.
clearexport_cvs ignores all CVS locks.
You must set the environment variable CVSROOT for the cvs command to work. If, for example, CVSROOT is set to /usr/src/cvs and an element archive is found in the CVS repository as /usr/src/cvs/gui/windows/main.cxxx,v, then an extraction command for a version of the element would look like
cvs get -Q -p -r1.1 gui/windows/main.cxx
During import, clearimport invokes a shell to extract data from the datafile. clearimport can handle some, but not all, characters that are special to shells. Import fails for any file name that includes any of these characters:
` ' " <Tab> [ ] ? * %
Succeeds | Fails |
---|---|
foo&bar |
foo[bar |
$MY_LIB |
yellow`sunset |
file name |
file*name |
Before running clearexport_cvs, rename any file whose name contains these characters.
NOTE: If you specify datafile-pname or source-name and any of the names include spaces, you must escape the space characters (UNIX) or enclose the name in double quotes (Windows). For example, on UNIX systems:
> clearexport_cvs "src files"
A CVS symbol is a mnemonic name for a particular revision or branch of a CVS file. clearexport_cvs translates the symbols to version labels and branch names (more precisely, to names of label types and branch types).
Translation to version labels - Suppose a CVS symbol, RLS_1.3, names a revision, 3.5. clearexport_cvs places a description of label type RLS_1.3 in the datafile, and clearimport imports that label type and assigns a label of that type to the version created from the CVS revision.
Handling of magic branches - When clearexport_cvs encounters a magic branch with a symbolic name in a CVS archive, it determines whether any versions have been checked in on that branch. If there are any, the magic branch's symbolic name is used as the name of the ClearCase/ClearCase LT branch; otherwise, the branch is ignored.
Translation to branch names - Suppose a CVS symbol, rls_1.3_fixes, names a branch 3.5.1. clearexport_cvs outputs a description of branch type rls_1.3_fixes, and clearimport creates a branch of that type at the ClearCase or ClearCase LT version created from CVS revision 3.5.
Because there is no concept of a subbranch of the main branch, clearexport_cvs does not process single-digit symbols that name CVS branches. If a CVS symbol includes characters that are not valid in names of label types or branch types, clearexport_cvs replaces the offending name. For example, the CVS symbol C++ can be renamed to "C..".
A label type cannot have the same name as a branch type within the same VOB. If the same CVS symbol names both a revision and a branch-not necessarily in the same CVS file-clearexport_cvs renames one of them. For example, after exporting a symbol FX354, which names a branch, it may encounter the same symbol as the name of a revision in another CVS file. In this case, it creates label type FX354_1.
This renaming of CVS symbols can introduce inconsistencies over multiple runs of clearexport_cvs. The same symbol may be renamed during processing of some CVS files, but not change during processing of other files. You can enforce consistency by using the same translation file in multiple invocations of clearexport_cvs. If you name such a file, using the -T option, clearexport_cvs uses it as follows:
To look up each CVS symbol to see how to translate it to a label type or branch type. If a match is found, the symbol is translated the same way.
To record each translation of a new CVS symbol for use in future lookups.
The first time you use clearexport_cvs, use -T to create a new translation file. On subsequent invocations of clearexport_cvs, use -T again, specifying 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_cvs encounters a file or directory 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 files and directories that could not be exported.
HANDLING OF DIRECTORY ARGUMENTS. Default: If you specify a directory as a source-name argument: (1) clearexport_cvs Processes the files in that directory but ignores the contents of the subdirectories; (2) clearimport creates a directory element for source-name and for each of its subdirectories.
SELECTIVE CONVERSION OF FILES. Default: clearexport_cvs processes all CVS revisions it finds.
|
|
|
|
|
|
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 |
PRESERVATION OF CVS INFORMATION AS ATTRIBUTES. Default: clearexport_cvs does not attach attributes to versions exported from CVS revisions.
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.
HANDLING OF BRANCHES AND LABELS. Default: As described in the section HANDLING OF CVS SYMBOLS, clearexport_cvs may rename a branch or label type to avoid naming conflicts.
STORAGE LOCATION OF DATAFILE. Default: clearexport_cvs creates datafile cvt_data in the current working directory.
SPECIFYING FILES TO BE EXPORTED. Default: clearexport_cvs processes the current working directory (equivalent to specifying "." as the source-name argument). If you specify a directory as a source-name argument: (1) clearexport_cvs processes the files in that directory but ignores the contents of the subdirectories; (2) clearimport creates a directory element for source-name and for each of its subdirectories (except one named CVS or cvs).
|
|
Create a datafile for a single CVS file.
clearexport_cvs myprogram.c,v
Process three CVS files in the current working directory and store the datafile in file cvt_include.
clearexport_cvs -o cvt_include bgr1.h,v bgr2.h,v bgr3.h,v
clearexport_*, clearimport, events_ccase, relocate, cvs(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. |