clearexport_ssafe

Convert SourceSafe files to ClearCase/ClearCase LT elements

APPLICABILITY


Product

Command Type

ClearCase


command


ClearCase LT


command


Platform

Windows

SYNOPSIS

clearexport_ssafe [ -r ] [ [ -s date-time ] [ -p date-time ] | -I { now | date-time } ]

[ -V ] [ -b target-branch [ -v version-id ] ]
[ -T translation-file ] [ -o datafile-pname] [ source-name]

DESCRIPTION

clearexport_ssafe and clearimport allow you to copy SourceSafe files to a VOB. You can copy a single file, multiple files, or an entire project tree.

NOTE: Before using clearexport_ssafe, run analyze.exe. Resolve any problems detected by analyze.exe before proceeding with the export operation.

During the export stage, you invoke clearexport_ssafe while connected to any SourceSafe project. clearexport_ssafe creates a datafile (by default, cvt_data), and places in it the descriptions of elements and versions.

In the import stage, you invoke clearimport on the datafile. clearimport reads the descriptions in the datafile and imports the information into the VOB.

clearexport_ssafe converts each SourceSafe label into a ClearCase or ClearCase LT version label. clearexport_ssafe creates separate elements for each SourceSafe file. You can specify a translation file to control naming of labels, enforcing consistency over multiple invocations of the command. You can use the -V option to preserve SourceSafe version numbers as attributes of the corresponding ClearCase/ClearCase LT versions.

NOTE: clearexport_ssafe and clearimport use 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: clearexport_ssafe uses the value of the TMP environment variable as the directory for temporary files.

SourceSafe Checked-out Files

clearexport_ssafe issues warning messages when it encounters checked-out SourceSafe files, but still processes the files.

SourceSafe Executable in PATH

For clearexport_ssafe to work, the SourceSafe command-line executable, ss.exe, must be in your PATH environment variable. ss.exe must work without prompting you for a user name and password. To prevent prompting, you might need to use a SourceSafe user name that matches your domain login user name, or you might need to set the SSUSER environment variable and set the corresponding password to blank, or no password.

SPECIAL CHARACTERS IN FILENAMES

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. The import fails for any filename that includes any of these characters:

`  '  "  <Tab>  [  ]  ?  *  %

For example:

Succeeds Fails

foo&bar

foo?bar

$MY_LIB

yellow`sunset

Before running clearexport_ssafe, rename any filename that contains these characters.

TRANSLATION FILE

Renaming of SourceSafe labels can introduce inconsistencies over multiple runs of clearexport_ssafe. The same label might be renamed during processing of some SourceSafe files, but remain unchanged during processing of other files. You can enforce consistency by using the same translation file in multiple invocations of clearexport_ssafe. If you name such a file (using the -T option), clearexport_ssafe uses it to:

The first time you use clearexport_ssafe, use -T to create a new translation file. On subsequent invocations of clearexport_ssafe, use -T again and specify the same translation file, for consistent name translation.

Syntax of Translation File

The translation file consists of one or more lines in the following form:

label old-name new-name

For example, to rename the label BL1.7 to IMPORT_BASE and the label BL2 to IMPORT_BASE2, the translation file would be:

label BL1.7 IMPORT_BASE
label BL2 IMPORT_BASE2

No blank lines are allowed in the file.

SHARES

clearexport_ssafe does not preserve shares as hard links during conversion. Instead, shares become separate elements.

LABELS

clearexport_ssafe converts a SourceSafe label into a ClearCase/ClearCase LT label with the same name.

NOTE: Labels on SourceSafe directories are not exported.

BRANCHES

clearexport_ssafe does not convert SourceSafe branches to ClearCase/ClearCase LT branches. Instead, clearexport_ssafe creates separate elements.

PINS

clearexport_ssafe translates SourceSafe pins to ClearCase/ClearCase LT version labels named PINNED.

NO DELTAS

SourceSafe lets you assign the NO DELTAS attribute to elements, which directs SourceSafe to keep only the current version of the element. SourceSafe keeps a history of all versions, but the contents of only the current version. clearexport_ssafe creates an empty version for each of the previous versions of the element, and a version with contents for the current version. Because ClearCase and ClearCase LT do not include a feature comparable to NODELTAS, when you create new versions of the element, the previous versions and their contents are stored. You can, however, use the rmver -data command to remove a version's contents.

HANDLING OF OBJECTS THAT CANNOT BE EXPORTED

When clearexport_ssafe 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.

RESTRICTIONS

None.

OPTIONS AND ARGUMENTS

HANDLING OF DIRECTORY ARGUMENTS.  clearexport_ssafe processes the files in your SourceSafe current project. You cannot specify a pathname with the source-name argument.

-r

clearexport_ssafe descends recursively into all subprojects of your current project.
NOTE: Do not specify the RECURSIVE variable in your SourceSafe initialization file (.ini).

SELECTIVE CONVERSION OF FILES.  Default: clearexport_ssafe processes all files it encounters.

-s date-time

clearexport_ssafe processes only files that have been modified since the specified time. Use this option for regular, incremental updating of an element from a SourceSafe file that is still under development. Be sure to specify a date-time that covers the entire period since the preceding update. In other situations, it is better to use -I instead of -s.
clearexport_ssafe determines whether to process a SourceSafe file by using the last-modified date/time of the file. If this date/time is before the date-time you specified with -s, clearexport_ssafe does not process any of the versions of the file. If the date/time is after the date-time you specified, clearexport_ssafe processes the following versions:

  • All versions created since the specified date-time
  • All versions that have labels
NOTE: In an incremental updating situation, if you remove a label from a SourceSafe file, clearimport does not remove the label from the ClearCase/ClearCase LT element.
-p date-time

Like -s, but processes only versions modified with new metadata (labels, branches, attributes, and so on) or created prior to the specified time.
-I { now | date-time }

Processes important versions only, but includes all versions created since the specified time. A version is important if:

  • it is the most recent version
  • it has a label
To export only important versions, use -I now. The time is specified in one of the following formats:
date.time | date | time | now
where:

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

Specify the time in 24-hour format, relative to the local time zone. If you omit the time, it defaults to 00:00:00. If you omit the date, it defaults to 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, it defaults to Greenwich Mean Time (GMT). (Dates before January 1, 1970 Universal Coordinated Time (UTC) are invalid.)

PRESERVATION OF SOURCESAFE INFORMATION AS ATTRIBUTES.  Default: clearexport_ssafe does not attach attributes to versions exported from SourceSafe versions.

-V

Attaches an attribute of type SSAFE_VERSION to each newly-created version. The string value of the attribute is the SourceSafe version number of the processed version. (clearimport creates attribute type SSAFE_VERSION, if necessary.)
If you use the -s option with this option, clearimport attaches SSAFE_VERSION attributes only to versions created after the date-time you specified.
Each attribute requires about 1KB of storage in the VOB database.

CREATING NEW VERSIONS ON A BRANCH.  Default: clearimport creates new versions of a file or directory element on the element's main branch.

-b target-branch [ -v version-id ]

Converts each file to a version on branch target-branch of the new or existing element. Whenever clearimport creates a new element in the target VOB, it also revises the parent directory element on branch target-branch. To prevent directory branching, you can check out all directories on any branch before importing. clearimport then uses the checked-out directories.
If branch type target-branch does not already exist in the target VOB, clearimport creates it. If an existing element already has a branch of this type, the new version extends this branch; otherwise, clearimport sprouts target-branch from version \main\LATEST (\main\0 for new elements). To specify another version from which the branch should sprout, use the -v option.

TRANSLATION OF LABELS.  Default: clearexport_ssafe may automatically rename a label type to avoid naming conflicts.

-T translation-file

Uses the specified translation file to control and record the conversion of SourceSafe label names to ClearCase/ClearCase LT version labels.

STORAGE LOCATION OF DATAFILE.  Default: clearexport_ssafe creates the datafile cvt_data in the current working directory.

-o datafile-pname
Stores the datafile at the specified location. An error occurs if datafile already exists.
NOTE: Do not specify the OUTPUT variable in your SourceSafe initialization file (.ini).

SPECIFYING FILES TO BE EXPORTED.  Default: The SourceSafe current project (equivalent to specifying "."as the source-name argument). clearexport_ssafe processes each SourceSafe file in the current project, and creates a directory element for each subproject of the current project.

source-name

The name of the SourceSafe current project, or a file or subproject in that project:

  • For each SourceSafe file, clearexport_ssafe places a description in the datafile.
  • For the current project, clearexport_ssafe places a description in the datafile for all the elements it catalogs. clearimport creates a directory element for the specified project itself, and for its subprojects.
The source-name must be a SourceSafe file or project in the SourceSafe current project. This enables clearimport to reliably access the source data.
clearexport_ssafe processes files and subprojects from only your SourceSafe current project. You cannot use source-name to specify a pathname that is not in your SourceSafe current project.

EXAMPLES

SEE ALSO

clearexport_*, clearimport, events_ccase, relocate