Table of Contents

Name

wci - check in new file revisions, import files and directories

Synopsis

wci [-BdfIKlMnOpPqRTuvVWX] [-auto|-aType] [-CComment] [-jpatternList] [-kkv|-kk|-kv|-ko] [-mMode] [-o/Path] [-sDate] [-tLockComment] [-NWorkspaceName] [-hHost -SSnapshot [-DDir]] name ...

Description

For each file argument, wci adds a revision to that archive file in the SnapshotCM project archive and updates the mapped snapshot to reference the new revision. wci prompts for a change message to be stored with the new revision. In order to perform a file check in, the file must be locked by the user in the mapped snapshot. Once the new revision has been checked in, wci deletes its lock.

wci is also used to import archive files and directories into the snapshot. See the -auto and -a options below.

If file refers to a directory, a new revision will be created for each file in that directory for which the caller has a lock and for which a local working file exists. If no files match these conditions, wci quietly returns success. If the -adir option is specified, only directories will be imported into the snapshot. If any other -a option is used, all existing files in the local directory will have an initial revision created in the snapshot. If the -auto option is provided for an existing directory containing files both actions will take place: directory created (if needed) and initial file revisions created in the snapshot.

Workspace Mapping

Mapping is consistent across all workspace commands. See wco(1) for details.

Default Options

Default options can be set on most workspace commands. See wco(1) for details.

Workspace Options

The workspace mapping is automatically looked up in the user's workspace mapping table for the given files. Override this by specifying an explicit workspace:
-NworkspaceName
Use the named workspace mapping.

Or override with a temporary workspace mapping with these three options:

-hHost
Use the SnapshotCM server on Host for a workspace mapping.
-SSnapshotPath
Use SnapshotPath for a workspace mapping.
-DWorkspaceDirectory
The local destination directory for a workspace mapping. This can be a relative or absolute path. If this option is not provided with the other two, the local destination directory defaults to the current directory where the command is executed.

For more information on workspace mappings, see wmap(1) .

Options

-auto
Enable file import and automatically set file-import type. Wci will analyze each file's contents to determine the best settings for I/O mode and keyword expansion. If file content is text, then keyword+value expansion mode will be set. Otherwise, keyword expansion mode will be set to off. This is the preferred option to use for importing files and directories. This is the only option you should use to recursively import a directory hierarchy.
-aType
Enable file import and set the I/O and keyword expansion modes to match a specific type of file being imported into the archive. Set file-create 'Type' to:
dir
- directory.
text
- text file, text I/O, keyword+value expansion.
gentext
- generated text file, text I/O, keyword expansion off.
bin
- versioned binary file, binary I/O, keyword expansion off.
largebin
- large binary file, binary I/O, keyword expansion off.
-B
Set file I/O mode to 'binary'. This allows you to override the default setting of I/O mode for the specific check in and force it to use binary mode. If this is a file import action, the value will become the default value for this file and overrides the default set by the -a option. (Also, see -T option.)
-CComment
Set check in comment to this string. If Comment contains the literal string $(LockComment), or begins or ends with a '+' (without a trailing new line), replace the pattern with the lock comment and use as the check in comment. The lock comment substitutions allow one to check in many files with individually meaningful comments (assuming you have set individual lock comments), while also providing a common shared comment.
-d
If file is a directory, operate on it only, not the files within it. Combine with -R and -auto to import the existing directory hierarchy from a local workspace into the snapshot without checking in the files in those directories.
-f
Force the operation. This allows you to override some check-in errors (such as forcing binary I/O mode during import on a text file, checking in without any changes, or overriding merge conflicts).
-I
Enable check in of modified files which are not locked. Normally, only locked files can be checked in. Default behavior in concurrent workspaces.
-jpatternList
List only files whose name (or path) matches patternList. PatternList consists of one or more patterns separated by a '|' (pipe/or) symbol. Each pattern can contain shell wild cards as follows:

* - match 0 or more characters
? - match any one character
[set] - match any character in set
[!set] - match any character not in set

A pattern not ending in a slash ('/') matches only files. A pattern ending in a slash matches only directories. A pattern containing a slash other than at the end is matched against the full workspace path. Otherwise pattern is matched against the last component of the path. If patternList begins with an '!' (exclamation/bang) character, the normal selection is negated.

-kkv, -kk, -kv, -ko
If creating a new file in the archive, set the default keyword expansion mode for checking out file contents (overrides the value selected by the -a option). Otherwise, this option is only used with the -u or -l option to override the default keyword expansion mode for the checkout operation. See wco(1) for more information.
-K
Enable modification time preservation so that changes to a file's content (such as keyword editing) during check in will not update the modification time.

A file's modification time normally is not updated during check in to avoid triggering often unnecessary and undesirable builds, even when the file content is updated to reflect changes to keyword expansions (-u and -l options). Sometimes, however, keyword expansion values are embedded into the delivered content such that rebuilds after check in are desirable. Use this option should this be the case.
-l
Lock and check out the new file revision just checked in. The file is locked in the mapped snapshot.
-mMode
Set file mode access permissions. This is only used when creating new files/directories in the archive. Otherwise, the current mode of the local file will be used or a default value (if there is no local file).
Mode = numeric-mode (0444).
Mode = symbolic-mode (u+w,a=r).
-M
Print workspace mapping before normal output.
-n
No Execute mode. Show the operations that would happen, but do not really execute them.
-o/Path
Map /Path in the selected snapshot to the specified (-D) local directory, creating a temporary, partial workspace mapping for the command. Normally, the root directory of a snapshot is what is mapped.
-p
After check in, write file contents to stdout.
-P
Read from 'stdin' for check in. This is only useful for checking in a single file.
-q
Quiet mode. Do not display status text showing the check-in operations being done or the warning or error message text. To determine if an error occurred you need to test the exit code of the command.
-R
Operate recursively. Recursively traverse all subdirectories and perform the requested operations on all files and directories in each subdirectory. If not importing new items, only files locked in the local workspace will be operated upon.
-sDate
Set the modification date for the new revision. Date silently will be forced to be greater than any existing revision of file. Useful primarily for importing history from other CM systems. See wco(1) for supported date formats.
-tLockCmt
Set Lock Comment to this string.
-T
Set file I/O mode to 'text'. This allows you to override the default setting of I/O mode for this specific check in. If file is being imported, the value will override the default set by the -a option. (Also, see -B option.)
-u
Update the local file after check in. Updates may be required if the file contains keywords whose value is affected by the check in.
-v
Show file revision information on check out.
-V
Print internal version and exit.
-W
Mark the local file writable after check out.
-X
Display 'full archive path' names.

Diagnostics

Exit status is 0 if all specified files were successfully checked in, 1 if a file could not be checked in, and >1 if there was a bad option or a network error.

Examples

Assume we have created a workspace named "TestWork":

   wmap add -N TestWork -h archiveHost \

   -S /TestProject/TP1.0 -D $HOME/WorkSpace

To import the working file main.c into /TestArchive/main.c end lock it for further changes, enter the command

   cd $HOME/WorkSpace/TestArchive
   wci -l -auto main.c

To check in later changes to main.c and keep an unlocked copy, enter the command

   cd $HOME/WorkSpace/TestArchive
   wci -u main.c

To check in a formatted manual page as name doc.fmt, enter the command

   nroff -man doc.1 | wci -P -C+ doc.fmt

See Also

wco(1) , wdiff(1) , whist(1) , wls(1) , wmap(1) , wmerge(1) , wremove(1) , wrename(1) , wset(1) , wupdate(1) .


Table of Contents