Converts RCS files to ClearCase elements
ClearCase (administrative command)
The clearexport_rcs command processes Revision Control System (RCS) files so they can be imported into ClearCase elements and versions. The source data can range from a single file to an entire directory tree.
During the export stage, you invoke clearexport_rcs in the area where the RCS files reside. clearexport_rcs creates a datafile (by default, named cvt_data), and places in it descriptions of elements, branches, and versions. clearexport_rcs 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_rcs ignores most information in RCS files that is not related to version-tree structure. clearexport_rcs converts each RCS symbol, which names a revision or branch, into the appropriate ClearCase construct: version label or branch. You can specify a translation file to control naming, enforcing consistency over multiple invocations of clearexport_rcs. You can use the -S and -V options to preserve RCS state attributes and RCS revision numbers as attributes of the corresponding ClearCase versions.
clearexport_rcs and clearimport use ClearCase 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_rcs 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_rcs and clearimport on the Windows machine.
clearexport_rcs works directly with the structured RCS 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_rcs issues warning messages when it encounters checked-out files, but it still processes them.
clearexport_rcs ignores all RCS locks.
If RCS files are stored in RCS (or rcs; case is not important) subdirectories, clearexport_rcs collapses the subdirectory level in the export process. For example, RCS file .\proj\RCS\main.c,v becomes element .\proj\main.c.
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_rcs, 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 enclose the name in double quotes. For example:
> clearexport_rcs "src files"
An RCS symbol is a mnemonic name for a particular revision or branch of an RCS file. clearexport_rcs translates the symbols to version labels and branch names (more precisely, to names of label types and branch types).
Because there is no ClearCase concept of a subbranch of the main branch, clearexport_rcs does not process single-digit symbols that name RCS branches. If an RCS symbol includes characters that are not valid in names of label types or branch types, clearexport_rcs replaces the offending name. For example, the RCS 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 RCS symbol names both a revision and a branch-not necessarily in the same RCS file-clearexport_rcs 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 RCS file. In this case, it creates label type FX354_1.
This renaming of RCS symbols can introduce inconsistencies over multiple runs of clearexport_rcs. The same symbol may be renamed during processing of some RCS files, but not chang during processing of other files. You can enforce consistency by using the same translation file in multiple invocations of clearexport_rcs. If you name such a file, using the -T option, clearexport_rcs uses it as follows:
The first time you use clearexport_rcs, use -T to create a new translation file. On subsequent invocations of clearexport_rcs, 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.
Revisions on the main branch of an RCS file have two-digit identifiers (for example, 1.2). These revisions become versions on the main branch of the ClearCase element, as illustrated in Figure 4.
Figure 4 Conversion of RCS Revisions
Note that the major revision substructure in the RCS revision tree is lost in the translation-all the RCS revisions become versions on the main branch. However, you can use the -V option to preserve this information in the form of attributes attached to the versions.
Revisions on subbranches of an RCS file have identifiers consisting of an even number of digits; no fewer than four (for example, 1.2.1.5, 1.2.1.5.1.3). These revisions become versions on subbranches of the ClearCase element, as illustrated in Figure 5.
Figure 5 Conversion of RCS Subbranches
clearimport creates branch types with three-digit names (1.2.1 in the example above). Thus, RCS revision 1.2.1.3 becomes version 3 on branch 1.2.1.
When clearexport_rcs 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.
Permissions Checking: No special permissions required. Locks: No locks apply.
HANDLING OF DIRECTORY ARGUMENTS. Default: If you specify a directory as a source-name argument: (1) clearexport_rcs 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_rcs processes all RCS 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 RCS INFORMATION AS ATTRIBUTES. Default: clearexport_rcs does not attach attributes to versions exported from RCS revisions.
DIRECTORY FOR TEMPORARY FILES. Default: clearexport_rcs uses the value of the TMP environment variable as the directory for temporary files.
HANDLING OF BRANCHES AND LABELS. Default: As described in the section HANDLING OF RCS SYMBOLS, clearexport_rcs may rename a branch or label type to avoid naming conflicts.
STORAGE LOCATION OF DATAFILE. Default: clearexport_rcs creates datafile cvt_data in the current working directory.
SPECIFYING FILES TO BE EXPORTED. Default: clearexport_rcs 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_rcs 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 RCS or rcs).
|
|
c:\> clearexport_rcs myprogram.c,v
c:\> clearexport_rcs -o cvt_include bgr1.h,v bgr2.h,v bgr3.h,v
clearexport_*, clearimport, events_ccase, relocate
|
Feedback on the documentation in this site? We welcome any comments!
Copyright © 1999 by Rational Software Corporation. All rights reserved. |