clearfsimport

Converts file system objects to element versions

APPLICABILITY


Product

Command Type

ClearCase


command


ClearCase LT


command


Platform

UNIX


Windows

SYNOPSIS

clearfsimport [ -preview ] [ -follow ] [ -recurse ] [ -rmname ] [ -comment comment ]

[ -mklabel label ] [ -nsetevent ] [ -identical ] [ -master ] [ -unco ] source-name [ . . . ] target-VOB-directory
clearfsimport [ -preview ] [ -recurse ] [ -rmname ] [ -comment comment ]

[ -mklabel label ] [ -nsetevent ] [ -identical ] [ -master ] [ -unco ] [ -downcase ] source-name [ . . . ] target-VOB-directory

DESCRIPTION

The clearfsimport command reads the specified file system source objects and places them in the target VOB. This command uses magic files to determine which element type to use for each element created (see the cc.magic reference page).

RESTRICTIONS

Identities: You must be root (UNIX) or the VOB owner to run clearfsimport unless you invoke it with the -nsetevent option.

Locks: If it encounters a VOB lock while trying to write data during an import operation, clearfsimport pauses and retries the operation every 60 seconds until it succeeds.

Mastership: (Replicated VOBs only) Your current replica must master the branch types, branches, elements, and type objects involved in the import. With the -master option, the importer can create a new element and its main branch even if the main branch is not mastered by your current replica. The -master option also allows auto-make-branch during element creation; mastership of newly created branches is assigned to the current replica. When you specify the -master option, you must be able to check out the parent directory of the new element.

OPTIONS AND ARGUMENTS

PREVIEWING THE RESULTS. Default: No preview.

-preview

Previews the import, listing all elements that the import would add or change, as well as any checkouts that would conflict with imports, but does not import anything.

HANDLING OF UNIX SYMBOLIC LINKS. Default: Processes each UNIX symbolic link as a VOB symbolic link with the same link text.

-follow

Processes the object to which a UNIX symbolic link points, instead of importing the link itself into the VOB.

HANDLING OF DIRECTORY ARGUMENTS.   Default: If a source-name argument names a directory to be imported, an element version is created for the directory and for each file, directory, or UNIX symbolic link residing at the top level of the directory.

-recurse

Descends recursively into all source-name arguments that are directories.

HANDLING OF EXISTING VOB DIRECTORIES. Default: Existing VOB directories that are not present in the sources to be imported are left as is.

-rmname

For all source-names that are directories, performs an rmname operation on elements that already existed in the VOB but are not present in the source directory. If used in combination with -recurse, performs this rmname operation in all directories traversed.

COMMENTS. Default: created by clearfsimport

-comment comment

Attaches the specified comment instead of the default comment to each element version checked in to the VOB.

LABELING. Default: No labeling.

-mklabel label

Attaches the specified label instance to each element version checked in. If the corresponding label type does not exist, it is created. If the label is already attached to an existing element version, it is moved.

EVENT RECORDS. Default: Historical information associated with the sources is preserved.

-nsetevent

Specifies that event records and historical information for new elements and element versions show the user who executed clearfsimport and the date of execution, not the original data associated with the sources. This option creates element versions that are newer than the original sources; thus, the clearfsimport operation is not restartable after you have invoked it with this option.

CREATION OF IDENTICAL SUCCESSOR VERSIONS. Default: Element versions that are identical to their predecessors in the source are not created.

-identical

Creates a new version of an element-even if it is identical to its predecessor-if the source has a more recent date than that of the version in the VOB.

BRANCH MASTERSHIP. Default: The main branch of the element is mastered by the replica that masters the branch's type.

-master

Assigns mastership of the main branch of the element to the VOB replica at which you execute this command.

HANDLING OF EXISTING CHECKED OUT ELEMENTS. Default: When clearfsimport encounters a checked out element that already exists in the target VOB and that corresponds to a source to be imported, it prints an error and continues.

-unco

If a checked-out file element corresponding to a source file to be imported already exists in the target VOB, an uncheckout operation is executed on the element and the corresponding view-private file is retained with a suffix of .keep. The import operation then proceeds to check the element out again, then checks in the imported version.

HANDLING OF CASE OF IMPORTED ELEMENTS. Default: Case preserving.

-downcase

Forces downcasing of imported elements.
NOTE: When importing files from a UNIX host into a VOB on a Windows NT host, clearfsimport may be unable to operate correctly on files and directories that have mixed-case names. For example, if a mixed-case name is specified on the command line, clearfsimport will create the element name as specified, even if the case mix of the source is different. In addition, the -rmname option will not work where source and target elements differ only in character case. Consistent use of -downcase can help avoid these problems. If -downcase is specified for an initial import from UNIX to Windows NT, it should be specified on any subsequent imports into the same VOB directories.

SPECIFYING THE SOURCE. Default: None.

source-name [. . .]

Flat files, directories, and UNIX symbolic links to be imported to the VOB.
For each pathname, the leaf of the pathname is imported into the target VOB. For example, /usr/src/lib/foo.c is imported into the VOB /vobs/mylib as /vobs/mylib/foo.c or into the VOB /bigvob as /bigvob/foo.c.
For each file, an element version is imported. If a corresponding version of the file already exists in the target VOB and is checked out, clearfsimport prints and error and continues unless the -unco option was specified. A summary of import failures due to checked out elements is printed at the completion of the import operation.
For each directory, versions are created for all files and UNIX symbolic links it contains. Also created is a directory element with one version for the directory and each of its subdirectories. Checked out VOB directories corresponding to source directories to be imported are re-used.

SPECIFYING THE TARGET VOB. Default: None.

target-VOB-directory

The VOB directory to which the sources are to be imported.

EXAMPLES

SEE ALSO

cc.magic, events_ccase, relocate, rmname, uncheckout