." ." Copyright (c) 1998 by Sun Microsystems, Inc. ." ." @(#)workspace.1 1.64 00/03/28 SMI ." .TH WORKSPACE 1 "00/03/28 Sun WorkShop 6" .ds ]W .SH NAME workspace \- manipulate TeamWare workspaces .SH SYNOPSIS .B workspace .I command .I args \&.\|.\|. .LP .SH DESCRIPTION .IX "CodeManager" "TeamWare" "workspace" "" "\fBworkspace\fP" .LP The .B workspace command manipulates TeamWare workspaces. TeamWare was formerly known as CodeManager. A workspace is a directory that contains a subdirectory named .B Codemgr_wsdata used by \fBteamware\fP to store information about that workspace. .SH USAGE Many of the following subcommands take an optional list of workspaces, [ \fIws\fP .\|.\|. ]. If any workspaces are named, then they are operated upon. If no workspaces are named, then the value of the shell environment variable .SM CODEMGR_WS is used. If .SM CODEMGR_WS is not set and the current directory is contained within a workspace, the containing workspace is used. .TP 20 \fBaccess \fR[ \fB\-l \fR| -q \fIoperation\fR=\fIuser \fR] [ \fIws\fR .\|.\|. ] List or query the file \fIws\fB/Codemgr_wsdata/access_control\fR. If the .B \-l option is specified, the command lists the contents of \fBaccess_control\fR. If the .B \-q option is specified, the command queries \fBaccess_control\fR to determine if .IR user has permission to do .IR operation in .IR ws. The command exits with the following values: .sp .nf 0 = user does not have access 1 = user has access 2 = error .fi .IP The command also displays a textual message indicating whether or not .IR user has access. To add, delete, or change user entries, use the teamware GUI Props -> Workspace command, or edit the file \fIws\fB/Codemgr_wsdata/access_control\fR directly (see .BR access_control (4)). .TP 20n \fBcheck \fR[ \fB\-W \fR] \fR[ \fB\-s \fR] \fIws\fR .\|.\|. Audits workspaces and reports on inconsistencies. Checks files, access modes, parent-child relationships, and condition of the the history file. .IP .B \-W suppresses warning messages (shows error messages only). .B \-s suppresses all messages. .sp The command exits with the following values: .sp .nf 0 = workspace is okay 1 = error .fi .LP .TP 20n \fBchildren \fR[ \fB\-r \fR] [ \fIws\fR .\|.\|. ] List .IR ws 's children workspaces. With the .B \-r option, .IR ws 's descendant workspaces are recursively listed, each new generation indented two spaces. If more than one .I ws is specified, the name of each .I ws precedes its list. .TP 20n \fBcreate \fIws\fR .\|.\|. Create the named workspaces. If .I ws is the name of an existing SunOS directory, the command simply creates a .B Codemgr_wsdata directory directly under that directory. If .I ws does not exist, both it and its .B Codemgr_wsdata subdirectory are created. .TP 20n \fBdelete \fR[ \fB\-d \fR] \fR[ \fB\-f \fR] \fIws\fR .\|.\|. Delete the named workspaces. When a workspace is deleted: .RS .TP 3 \(bu Its name is removed from its parent's .B Codemgr_wsdata/children file .TP \(bu Its name is removed from its children's .B Codemgr_wsdata/parent file .TP \(bu The contents of the workspace are deleted .RE .IP Since it is a destructive operation, .B "workspace delete" prompts for confirmation before actually deleting a workspace. The .B \-f option forces deletion by bypassing confirmation. .IP Used with the .B \-d option, the command deletes only the .B Codemgr_wsdata subdirectory. .LP .sp .TP 20n \fBdescr \fR[ \fB\-n | -d | -a\fR] \fIws\fR .\|.\|. Lists the descriptive name and detailed description for the workspace. .IP .B \-n lists descriptive name only. .B \-d lists detailed description only. .B \-a lists both descriptive name and detailed description. .LP .sp .TP 20n \fBfilemv \fR[\fIfiles... targetdir\fR] Move a file. Moves both the clear file and its s.file. .RS .TP 3 .B Error Messages: .nf 2701 Couldn't determine absolute pathname for %ws 2702 stat of %s failed 2703 Destination file %s already exists 2704 No source file %s 2706 Target directory %s not found .fi .RE .TP 20n \fBfilerm \fR[\fIws\ files .\|.\|. \fR] Remove a file. Moves both the clear file and its s. file to .IR ws/deleted_files/ .IP where path is the same workspace-relative path as that of the given file. .RS .TP 3 .B Error Messages: .nf 2701 Couldn't determine absolute pathname for %s 2708 File %s does not exist 2709 Removal of Codemgr_data directory is not allowed 2710 Couldn't unlink %s .fi .RE .TP 20n \fBfind \fR[ \fB\-c \fR] \fR[ \fB\-m \fR] \fR[ \fB\-s \fR] \fR[ \fBwsname... \fR] Finds files in the current workspace or in the workspaces named by \fIwsname\fR. .IP If the \fB-c\fR option is specified, the command will list any files that have been checked out under SCCS. .IP If the \fB-m\fR option is specified, the command will list the names of any history files that contain unmerged deltas followed by the SID of each unmerged delta. .IP Adding the \fB-s\fR option will suppress the listing of SIDs, showing filename only. .TP \fBhelp\fR Displays the list of workspace subcommands and options. .TP 20n \fBlist \fR[ \fB\-r \fR] \fR[ \fIws \fR| \fIdir\fR .\|.\|. ] List .IR ws if it is a workspace. List any workspaces found underneath .IR dir. With the .B \-r option, .IR dir 's workspaces are recursively listed. If no .IR ws or .IR dir is given, then the value of the shell environment variable .SM CODEMGR_WSPATH is used. .TP 20n \fBlocks \fR[ \fB\-r \fR] [ \fIws\fR .\|.\|. ] With no option specified, the locks that are active for .IR ws are listed. If .B \-r is specified, the locks are listed and the user is prompted for which lock to remove. .TP 20n \fBmove \fIfrom_ws to_ws\fR Move the workspace .IR from_ws to workspace .IR to_ws. If the move is across file systems, teamware will copy all files to .I to_ws before it removes .IR from_ws. The command updates the parent and child workspaces to reflect the new location. .IP .B Note: Do not use the SunOS .B mv command to rename or move workspaces. The .B workspace move command updates files in the workspace's parent and children, as well as logging the event in the .B Codemgr_wsdata/history file. .IP If you inadvertently use the .B mv command to move/rename a workspace and discover that it has become "disconnected" from its parent and children, you can use the .B workspace move command to reconnect it. .IP For example, if you used the .B mv command to rename workspace . B A to file .BR B : .IP 1. Use the .B workspace move command to rename .B B to .BR C . The command updates the workspace's new name (\fBC\fP) in the parent and child workspaces. .IP 2. Lastly, use the .B workspace move command to change .B C back to \fBB\fP. Everything should be reconnected. .TP 20n \fBname\fP Name the workspace that the current directory resides in. .TP .BR parent " \fR[ \fB\-f \fR]\fR[ \fB\-p \fInewparent \fR] \fR[ \fB\-r \fR] \fR[ \fB\-u \fR] \fR[ \fIws\fR .\|.\|. ]" List .IR ws 's parent workspace, reparent .IR ws or unparent .IR ws. With no options specified, the .IR ws 's parent is listed. With the .B \-r option, .IR ws 's ancestor workspaces are recursively listed, each new generation indented two spaces. The recursive list begins with the parent workspace and proceeds through the previous generations. If more than one .I ws is specified, the name of each .I ws precedes its list. If the .B \-p option is set, the workspace will be reparented to .IR newparent ; .IR ws 's name is removed from its current parent's children list, and is added to .IR newparent 's children list. If the old parent no longer exists, use the \fB-f\fP option to force the reparent. To change the workspace so that it no longer has a parent, use the .B \-u option. .TP 20n .BR updatenames " \fR[ \fB\-z \fR] \fR[ \fIws\fR .\|.\|. ]" Update .IR ws 's name table by searching the workspace for .SM SCCS files. With the \fB\-z\fP option, also update files' name histories, if they are out of date. .I ws can also be the name of an environment. A workspace's name table contains an entry for every .SM SCCS file in that workspace. Each entry consists of a workspace-relative file name and four hexadecimal numbers computed from the file's first .SM SCCS delta. The \fBbringover\fP and \fBputback\fP commands rely on the name tables in the parent and child workspaces to detect and propagate renames. Even if one workspace's name table has been outdated by a rename in that workspace, bringover and putback can detect the rename by inspecting both workspaces' name tables. The \fBbringover\fP and \fBputback\fP commands identify renamed files and update the name table accordingly. The larger the workspace, the more time required to run this command. .IP In some cases when SCCS files have been copied within a workspace, \fBupdatenames\fP interactively prompts the user for the current names of some SCCS files. .SH "ENVIRONMENT" .TP 25 .SM CODEMGR_PATH_ONLY TeamWare commands first search for other TeamWare binaries relative to where their own binary is located in the file system, they then search in the directories specified in the .SM PATH environment variable. Setting this variable causes TeamWare commands to search for other TeamWare binaries only in .SM PATH. .TP .SM CODEMGR_WS Contains the name of a user's default workspace. The workspace specified by .SM CODEMGR_WS will automatically be used if \fB-w\fP option is not specified to a command. .TP .SM CODEMGR_WSPATH Specifies a list of workspace directories to be automatically loaded into the workspace pane upon tool startup. .IP The .SM CODEMGR_WSPATH variable can be to set to one or more directories that contain workspace directories. For example, to set this variable to the directories .B /export/home/ws and .BR ~/projects/ws , use the following command: .IP \fBexample% setenv CODEMGR_WSPATH "/export/home/ws ~/projects/ws"\fP .SH USAGE .LP .SH "SEE ALSO" .IR "Sun WorkShop TeamWare User's Guide" .LP .sp .nf bringover(1), codemgr(1), def.dir.flp(1), dmake(1), freezept(1), putback(1), rcs2ws(1), resolve(1), teamware(1), twbuild(1), twfreeze(1), twmerge(1), twversion(1), ws_undo(1), access_control(4), args(4), children(4), conflicts(4), description(4), freezepointfile(4), history(4), locks(4), nametable(4), notification(4), parent(4), putback.cmt(4) .fi .SH WARNINGS .SS TeamWare SCCS Restrictions .LP .TP 3 \(bu TeamWare does not support cyclic rename. It cannot keep track of files and file history if you switch file names. That is, do not issue these commands: .TP .ta 1i 1.26i workspace filemv fileA tmp .sp 0 workspace filemv fileB fileA .sp 0 workspace filemv tmp fileB .sp 0 .TP \(bu Avoid using the sccs subcommands cdc, comb, fix, and rmdel in TeamWare workspaces. Using these commands can alter SCCS history files in ways which will make them impossible for TeamWare to track. These commands also have undesirable side effects when used on files that exist in multiple workspaces that eventually may be merged. The problems with these commands are: .TP 5 .B cdc Can cause unnecessary branching and confusing histories. .TP .B comb Completely rebuilds the SCCS history file. .TP .B fix A front-end for rmdel. .TP .B rmdel SCCS restricts the use of the rmdel command to remove only the most recent (leaf) delta on a branch. If you remove a delta that also exists in another workspace, it is possible that another user will add a delta in the other workspace. The delta that was removed in your workspace will no longer be a leaf delta when the files are merged.