4. Techniques for Sharing Workspaces : Universal Access to a Workspace Located on a Share

Universal Access to a Workspace Located on a Share
A workspace whose workspace tree is network-accessible through a share, can be accessed from any client machine — running UNIX/Linux or Windows. The share can be configured through Samba/SMB or some other network file system. It must make the actual storage location available through a machine name and a simple “share name”: a name that looks like a single pathname component.
The ‘share_map.txt’ File
The technique in Accessing a Windows Workspace From Multiple Windows Clients relies only on Windows operating system facilities. But the “universal workspace access” technique requires the maintaining of a pathname-mapping file for use by the AccuRev Server. If a “share” (that is, shared directory) has an entry in the pathname-mapping file, any workspace located on that share can be used on all AccuRev client machines capable of accessing the machine where the share resides.
The pathname-mapping file is a text file, share_map.txt, which must be located in the AccuRev site_slice directory on the AccuRev Server machine. It maps share names to absolute pathnames. Each line of share_map.txt consists of three TAB-separated fields, describing one share. For example:
jupiter accwks /public05/accurev_workspaces
This entry says, “a share named accwks is physically located on machine jupiter, at absolute pathname /public05/accurev_workspaces”. More generally:
The first field (jupiter) names a machine where one or more workspace trees are (or will be) located.
The second field (accwks) specifies the share name.
The third field (/public05/accurev_workspaces) indicates the absolute pathname of the share on the machine. On a Windows machine, this includes the drive letter — for example, C:/Public Directories/AccuRev Workspaces.
All pathnames in share_map.txt must use forward-slash characters ( / ), even Windows pathnames.
The field separator in the share_map.txt file must be single TAB character — don’t use SPACEs. If a specification (e.g. a share name) includes a SPACE character, do not enclose the specification in quotes.
Workspace Location Entries
The accurev show wspaces (or the GUI’s View > Workspaces) command displays the locations of existing workspaces in the repository. The pathnames always use forward slashes, even if they are Windows pathnames.
AccuRev can record the location as an absolute pathname on its machine:
C:/wks/light24/mnt_john (Windows)
/bigdisk/home/john/widget_devel (UNIX/Linux)
Alternatively, it can record a location that incorporates a share name:
/accwks/wks_john (Windows or UNIX/Linux)
Universal workspace access requires that a workspace’s location be recorded as an absolute pathname in the workspaces table. (Note that the sharing technique described in Accessing a Windows Workspace From Multiple Windows Clients has the opposite requirement: workspace locations must incorporate the share name.) In addition, the “Host” name listed in this table for a workspace must exactly match the first field in some share_map.txt entry. Beware of domain name discrepancies — for example, jupiter vs. jupiter.mycorp.com.
Fixing Workspace Location Entries
If a workspace located on a share has the “wrong kind” of entry in the workspaces table, fix it to enable universal client access:
Make sure that share_map.txt has a valid entry for the share.
Use the chws command to change the location recorded in the workspaces table to an absolute pathname:
> accurev chws -w <workspace-name> -l . (“dash-ell dot”)
You must fix each workspace location entry in this way individually.
Fixing Machine Name Entries
If there’s a discrepancy between a machine’s name in a share_map.txt entry (say, jupiter) and its name in the workspaces table (say, jupiter.mycorp.com), change the workspace table entry:
accurev chws -w <workspace-name> -m jupiter
Example: Samba Share
Here’s an example of how it can all work in a Samba environment, elaborating on the scenario above:
The organization decides that a directory, /public05/accurev_workspaces, on UNIX host jupiter will be a location where users can create workspaces that can be shared across platforms.
The system administrator on jupiter turns that directory into a Samba share, named accwks. Here’s the relevant excerpt from the Samba smb.conf file on host jupiter:
comment = All users
path = /public05/accurev_workspaces
browseable = yes
guest ok = yes
writeable = yes
The AccuRev administrator makes this entry in the share_map.txt file, in the AccuRev Server’s site_slice directory.
jupiter accwks /public05/accurev_workspaces
User john, working on a Windows machine, wants to creates a workspace on the share. First, he makes the share accessible as a network drive:
net use T: \\jupiter\accwks
Then john creates his workspace on this network drive:
accurev mkws -w shrwks_john -b dvt_stream -l T:\wks_john
A show wspaces command indicates that the AccuRev Server uses an absolute pathname to record the new workspace’s location on jupiter:
shrwks_john /public05/accurev_workspaces/wks_john jupiter ...
john can now use this workspace from any client machine that can access the machine where the share resides.

Micro Focus