import

Creates an element (if one does not exist) corresponding to each selected file or directory in a workspace subtree

APPLICABILITY


Product

Command Type

Attache


command


Platform

UNIX


Windows

SYNOPSIS

import [ -ci ] [ -exc·lude exclude-pname] [ -lca·se]

[ -c·omment comment | -cfi·le comment-file-pname |-cq·uery | -cqe·ach | -nc·omment ]
pname ...

DESCRIPTION

The import command creates an element corresponding to each file or directory name in the workspace, if the element does not already exist in the VOB. For each file in the specified subtree, import checks to see whether an element of that name exists in the VOB. If not, import invokes mkelem on the file.

RESTRICTIONS

For checked-out directories, restrictions are the same as for checkout. For created elements, restrictions are the same as for mkelem.

OPTIONS AND ARGUMENTS

CHECKOUT OF THE NEW ELEMENT.  Default: mkelem checks out the new element. The file in the workspace becomes the checked-out version of the element. If -ci option is not specified, the local files are made writable.

-ci

Creates the new element and version \main\0, checks out the element, then uploads and checks in a new version containing the data in the workspace file. Local files that correspond to successfully checked-in versions are read-only.

SPECIFYING WHICH FILES TO EXCLUDE.  Default: None.

-exc·lude exclude-pname

Specifies a local file containing patterns of files to be excluded during the import. This exclude-pname contains a list of file names, one or more per line, separated by tabs or spaces. The file name arguments may contain standard wildcard patterns. Specifying a relative pathname for exclude-pname begins from Attache's startup directory, not the working directory, so a full local pathname is recommended.

CREATING NEW ELEMENT NAMES IN LOWERCASE.  Default: In Windows 95 or Windows NT, the default is to create the filename as it exists in the workspace. In Windows 3.x, the default is to create all new element names in all lower-case by default.

-lca·se

Specifies that all new element names are created in all lower-case. When the -lcase option is used and import converts the fiele name to lowercase, the file in the workspace is also renamed to match the new element.

EVENT RECORDS AND COMMENTS. Default: Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: -cqe). See the comments reference page. Comments can be edited with chevent.

-c·omment comment | -cfi·le comment-file-pname |-cq·uery | -cqe·ach | -nc·omment

Overrides the default with the option you specify. See the comments reference page.

SPECIFYING THE FILES TO BE IMPORTED.  Default: None.

pname...

Specifies the files to be imported. Wildcard patterns apply to the workspace contents; / (slash) denotes the workspace root. For example, /vobs/gui/*.c refers to all of the .c files in the /vobs/gui subdirectory of the workspace. Either slashes or backslashes can be used.

EXAMPLES

The UNIX examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.

The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.

In cleartool single-command mode, cmd-context represents the UNIX shell or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt. In Attache, cmd-context represents the workspace prompt.

SEE ALSO

attache_command_line_interface, checkout, mkelem, wildcards