Converts SCCS files to ClearCase elements
ClearCase (administrative command)
The clearexport_sccs command exports Source Code Control System (SCCS) 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_sccs in the area where the SCCS files reside. clearexport_sccs creates a datafile (by default, named cvt_data) containing descriptions of elements, branches, and versions. If any of the files to be processed reside below (rather than in) the current working directory, clearexport_sccs includes descriptions of the corresponding directory element(s) in datafile. clearexport_sccs follows symbolic links it encounters during the export stage.
In the import stage, you invoke clearimport on datafile to import information into the new VOB.
clearexport_sccs ignores information in SCCS files that is not related to version-tree structure; this includes flags, ID keywords, user lists, and Modification Request numbers. You can specify a translation file to control naming, enforcing consistency over multiple invocations of clearexport_sccs. You can use the -V option to preserve SCCS-IDs as attributes of the corresponding ClearCase versions.
clearexport_sccs and clearimport use ClearCase magic files to determine which element type should be used 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_sccs 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 your Windows machine and running both clearexport_sccs and clearimport on the Windows machine.
clearexport_sccs works directly with the structured SCCS s-files, which have the s. filename prefix. It does not process the g-files created with get and get -e commands. Be sure to check in such files with the delta command before running clearexport_sccs. clearexport_sccs issues warning messages when it encounters checked-out files, but it still processes them.
Other than issuing warning messages for checked-out files, clearexport_sccs ignores the p-files created by get -e.
If s-files are stored in SCCS (or sccs; case is not important) subdirectories, clearexport_sccs collapses the subdirectory level. For example, SCCS file ./proj/SCCS/s.main.c becomes element ./proj/main.c.
You can process an SCCS file in several passes. For example, you can use clearexport_sccs to process major revision level 1, and use it again to process major revision level 2. On the subsequent passes, clearimport updates an existing element correctly if that ClearCase VOB element has not been modified in the interim.
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_sccs, 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_sccs "src files"
Revisions on the main branch of an SCCS 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 6.
Figure 6 Conversion of SCCS Revisions
Note that the major revision substructure in the SCCS revision tree is lost in the translation-all the SCCS revisions become versions on the main branch. (But you can use the -V option to preserve this information in the form of attributes attached to the versions.)
Revisions on subbranches of an SCCS file have four-digit identifiers (for example, 1.2.1.5). These revisions become versions on subbranches of the ClearCase element, as illustrated in Figure 7.
Figure 7 Conversion of SCCS Subbranches
ClearCase branch types are created with three-digit names (1.2.1 in the example above). Thus, SCCS revision 1.2.1.3 becomes version 3 on branch 1.2.1.
Although it is not illustrated in Figure 7,clearexport_sccs can handle SCCS files that include branches off branches. clearexport_sccs uses the information in the SCCS delta list to determine which SCCS versions are the predecessors of other versions, then uses an algorithm to determine the correct branching structure.
An SCCS branch ID is a name for a particular branch of an SCCS file. clearexport_sccs translates the symbols to names of branch types. Suppose an SCCS symbol, rls_1.3_fixes, names a branch 3.5.1. clearexport_sccs exports a description of branch type rls_1.3_fixes, and clearimport creates a branch of that type at the ClearCase version created from SCCS revision 3.5.
You can enforce consistency of translation by using a translation file to control the names of ClearCase branches created from SCCS branches. If you name such a file using the -T option, clearexport_sccs uses it as follows:
The first time you use clearexport_sccs, use -T to create a new translation file. On subsequent invocations of clearexport_sccs, 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:
branch old-name new-name
For example, to rename the branch type pre_import_work to post_import_work and the branch type old_tests to obsolete_tests, the translation file contains the lines:
branch pre_import_work post_import_work
branch old_tests obsolete_tests
No blank lines are allowed in the file.
When clearexport_sccs 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_sccs 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_sccs processes all SCCS 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 SCCS-IDS AS ATTRIBUTES. Default: clearexport_sccs does not attach attributes to versions exported from SCCS revisions.
DIRECTORY FOR TEMPORARY FILES. Default: clearexport_sccs uses the value of the TMP environment variable as the directory for temporary files.
BRANCH NAME TRANSLATION. Default: As described in the section VERSION TREE STRUCTURE AFTER CONVERSION, clearexport_sccs creates ClearCase branch names based on the SCCS revision IDs.
STORAGE LOCATION OF DATAFILE. Default: clearexport_sccs creates datafile cvt_data in the current working directory.
SPECIFYING FILES TO BE EXPORTED. Default: clearexport_sccs 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_sccs processes the s-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 SCCS or sccs).
|
|
c:\> clearexport_sccs s.myprogram.c
c:\> clearexport_sccs -o cvt_include s.bgr1.h s.bgr2.h s.bgr3.h
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. |