The clearexport_pvcs command processes PVCS files so they can be imported into elements and versions. The source data for export can range from a single file to an entire directory tree.
During the export stage, you invoke clearexport_pvcs in the directory where the PVCS files reside. clearexport_pvcs creates a datafile (by default, named cvt_data) and places in it descriptions of elements, branches, and versions.
In the import stage, you invoke clearimport on the datafile to import information into the new VOB.
clearexport_pvcs ignores most information in PVCS files that is not related to version-tree structure. clearexport_pvcs converts each PVCS label, 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_pvcs.) You can use the –V option to preserve PVCS revision numbers as attributes of the corresponding ClearCase or ClearCase LT versions.
clearexport_pvcs and clearimport use magic files to determine which element type to use for each element clearimport creates. For more information about magic files and file typing, see the cc.magic reference page.
Note: You cannot run clearexport_pvcs 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_pvcs and clearimport on the Windows machine.
clearexport_pvcs works directly with PVCS files. It does not process the workfiles created with the get and get –l commands. Be sure to check in workfiles with the put command before running the exporter.
clearexport_pvcs issues warning messages when it encounters checked-out files, but it still processes them. clearexport_pvcs ignores all PVCS locks.
If PVCS files are stored in VCS (or vcs; case is not important) subdirectories, clearexport_pvcs collapses the subdirectory level. For example, PVCS file ./proj/VCS/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:
For example:
Before running clearexport_pvcs, rename any file whose name contains these characters.
Note: If any datafile-pname or source-name that you specify include spaces, the file name requires special treatment. On UNIX, you must escape the space characters:
On Windows, you must enclose the name in double quotes:
A PVCS symbol is a mnemonic name for a particular revision or branch of a PVCS file. clearexport_pvcs translates the symbols to version labels and branch names (more precisely, to names of label types and branch types).
Because there is no concept of a subbranch of the main branch, clearexport_pvcs does not process single-digit symbols that name PVCS branches. If a PVCS symbol includes characters that are not valid in names of label types or branch types, clearexport_pvcs replaces the offending name. For example, the PVCS symbol C++ may be renamed to C...
A label type cannot have the same name as a branch type within the same VOB. If the same PVCS symbol names both a revision and a branch—not necessarily in the same PVCS file—clearexport_pvcs 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 PVCS file. In this case, it creates label type FX354_1.
Renaming PVCS symbols can introduce inconsistencies over multiple runs of clearexport_pvcs. The same symbol may be renamed during processing of some PVCS files, but not change during processing of other files. You can enforce consistency by using the same translation file in multiple invocations of clearexport_pvcs. If you name such a file, using the –T option, clearexport_pvcs uses it as follows:
The first time you use clearexport_pvcs, use –T to create a new translation file. For consistent name translation, use –T on subsequent invocations of clearexport_pvcs and specify the same translation file.
The translation file consists of one or more lines in the following form:
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:
No blank lines are allowed in the file.
When clearexport_pvcs 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, it prints a summary of the files and directories that could not be exported.
clearexport_pvcs determines whether to process a PVCS archive by using the last-modified date/time of the archive. If this date/time is before the date-time you specify with –s, clearexport_pvcs does not process any of the revisions in the archive. If the date/time is after the date-time you specify, clearexport_pvcs processes the following revisions:
Note: For an incremental update, if you remove a label or branch from a PVCS version, clearimport does not remove the label or branch from the ClearCase or ClearCase LT element.
Specify the time in one of the following formats:
date.time | date | time | now where:
Specify 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 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.)
If you use the –s option with this option, clearimport attaches PVCS_REVISION attributes only to revisions created after the date-time you specified.
Each attribute requires about 1 KB of storage in the VOB database.
If you use the –s option with this option, clearimport attaches PVCS_GROUP attributes only to revisions created after the date-time you specified.
Each attribute requires about 1 KB of storage in the VOB database.
On Windows systems, the value of the TMP environment variable.
Each source-name can be a simple file or directory name or a wildcard as described in wildcards_ccase. Specifying a parent directory (..) causes an error, as does any UNIX pathname that includes a slash or any Windows pathname that includes a slash or backslash. Run this command in a directory under which the elements to be exported reside.
clearexport_*, clearimport, events_ccase, relocate, rcs(1), rsh(1) or remsh(1), sccs(1), wildcards_ccase
Copyright© 2003 Rational Software. All Rights Reserved.