2. AccuRev® Command-Line Reference : chws

chws
change the name and/or definition of a workspace
Usage
accurev chws -w <workspace> <new-name>
accurev chws -w <workspace> [ -l <new-location> ] [ -m <new-machine> ]
[ -b <new-backing-stream> ] [ -k <kind> ] [ -e <eol-type> ]
accurev chws -s <workspace> ...
Description
Note 1: before changing the location of a workspace, consult A Word of Caution on Windows Zip Utilities of the AccuRev Administrator’s Guide.
Note 2: A workspace that currently uses the exclusive-file-locking feature cannot subsequently be changed with the chws command. This restriction applies to workspaces whose depot uses the exclusive-file-locking feature.
The chws command can change any of the following specifications of an existing workspace:
name of the workspace (see Entity Names for information on naming workspaces)
the backing stream of the workspace
If appropriate, the chws command registers with AccuRev the fact that a workspace has changed location. However, chws does not physically move the contents of the workspace. Before using chws, you must move the workspace’s contents yourself, using operating system commands such as tar (UNIX/Linux) or xcopy (Windows).
Note: although chws enables you to give a new name to a workspace, you cannot then create a new workspace with the old name. The old name remains irrevocably associated with its workspace.
Options
-w <workspace>
Specify the name of the workspace to be changed. You don’t have to include the _<principal-name> suffix.
-s <workspace>
Specify the name of the workspace to be changed. Use the -s option when you change a workspace that belongs to another user. In this case, you must include the _<principal-name> suffix, in order to fully specify the workspace name. This is also useful when you have used the chuser command to change the principal-name of a user. Use chws -s to update this user’s workspace(s) to reflect the new principal-name.
<new-name>
Specify a new name for the workspace. This also renames the workspace stream.
With the -w option, you are restricted to changing the name of one of your own workspaces. chws adds the suffix _<your-principal-name> to the new name (if you don’t include the suffix yourself).
With the -s option, you can change the name of another user’s workspace. chws does not add any suffix to the new name, so you must include the _<principal-name> suffix yourself.
See Entity Names.
-k <kind>
Change the kind of workspace. See the mkws reference page for details on the specifiers d (default storage scheme), e (exclusive file locking), and a (anchor required).
-b <new-backing-stream>
Specify the stream to become the new backing stream of the workspace.
Note: after “reparenting” a workspace to a new backing stream, use the update command in that workspace to make sure it contains the correct version of each element.
-l <new-location>
Specify the pathname where you have moved the workspace tree. You must use a pathname that is valid on the machine where you are executing the chws command; if necessary, AccuRev will figure out the actual pathname on the machine where the workspace tree has been moved.
Typically, you cd to the location where you have moved the workspace tree, then use “.” as the argument to the -l option. See Examples below.
-m <new-machine>
Specify the hostname where you have moved the workspace tree. It is usually not necessary to use this option, even if you move the workspace tree to another machine.
-e <eol-type>
Specify the line terminator to be used when an AccuRev command (e.g. update, co) copies a version of a text file from depot storage to the workspace. (In depot storage, all text files are stored with the AccuRev-standard line terminator, NL.) The <eol-type> can be d (default: use the standard line terminator for the client machine’s operating system), u (use the UNIX/Linux line terminator, NL), or w (use the Windows line terminator, CR-NL).
Examples
After moving the contents of your workspace to a network storage area accessed on your machine as /net/bigdisk/wks/mary/amber_devel, register the new workspace location:
> accurev chws -w amber_dvt_mary -l /net/bigdisk/wks/mary/amber_devel
Reparent your workspace to a new development stream:
> accurev chws -w amber_dvt_mary -b q2_project_dev
After using chuser to correct a user’s principal-name from “fredriks” to “frederick”, change the user’s “mercury_itr” workspace to reflect the corrected principal-name.
> accurev chws -s mercury_itr_fredriks mercury_itr_frederick
See Also
excl, incl, mkref, mkws, show (refs and wspaces)

Micro Focus