The simplest way to use AccuRev is to have a single repository, managed by a single AccuRev Server. The server process runs on a particular machine, and listens for client requests on a particular IP port. But it’s possible for an organization to have multiple servers running concurrently on different machines. Each server manages a separate repository, located on the server’s own machine; the servers and their repositories are completely independent (and unaware) of each other.
There are no special considerations, and no special procedures, for setting up multiple machines to run AccuRev Servers. You can install a server on as many hosts as desired (subject to license restrictions) within a local area or wide area network. The fact that AccuRev is installed on machines that are networked together is irrelevant; each installation is independent of all the others.
Installing AccuRev on a machine creates a client configuration file, acclient.cnf, in the AccuRev executables directory. (That’s subdirectory
bin of the location designated as the “Install Folder” or “Install Directory” during installation.) The configuration file specifies the network location of the IP port on which an instance of the AccuRev Server is listening for client requests. For example:
If more than one server has already been set up, you’ll need to specify one of them during the client installation. Check with a system administrator, or look at file
acserver.cnf in the AccuRev executables directory on the machine where the server is installed, For example, the server machine’s
acserver.cnf file might contain:
You can modify the client configuration file at any time to identify additional AccuRev servers. For example, in a network where AccuRev servers are running on machines
jupiter,
venus, and
pluto, each client machine’s
acclient.cnf file might look like this:
Each server’s IP port must be listed on a separate line (even though the keyword is “SERVERS”, not “SERVER”). The file must not contain any empty lines; be sure to check the end of the file.
In what order should the servers be listed? For users of the AccuRev CLI (
accurev), the order is important: by default, each AccuRev CLI command is directed to the server listed on the
first line of the client configuration file. This implies that if you want to change the “active server” in the CLI, you need to rearrange the lines in your machine’s
acclient.cnf file. This is quite doable, but cumbersome; the sections below describe a better way for CLI users to work with multiple AccuRev servers. For users of the AccuRev GUI, it doesn’t matter. The GUI’s
Tools > Login command revises the
acclient.cnf file, moving the line for the new active server to the beginning of the file.
Each AccuRev
workspace is associated with a particular AccuRev server: the workspace is attached to a particular stream, which belongs to a particular depot, which is managed by a particular server. When you execute a
mkws command to create a new workspace, the command is directed to the server that is listed first in the machine’s
acclient.cnf file. (You must use the
–s option to specify a backing stream for the new workspace; this stream must belong to one of the depots managed by that particular server.) To access multiple workspaces on multiple servers, create a workspace configuration file as described in
Working with Multiple Repositories on page 4 of the
CLI User’s Guide.
Note: It is more precise to describe the workspace’s association as being with a particular AccuRev
repository, rather than with a particular AccuRev
server. This workspace-to-repository association is permanent: AccuRev has no concept of associating an existing workspace with a different repository (or even with a different depot in the same repository). On the other hand, many of the details can change: you can rename a workspace; you can move a workspace to a different location in the file system or to a different machine; you can move a repository to a different machine.
For most commands in the accurev CLI program, you can specify the AccuRev server/repository to target on the command line, using the
–H option:
The –H option follows the command name — in this example,
show —
not the program name,
accurev. The hostname/port-number argument to this option has the same form as in the
acclient.cnf file.
This mechanism bypasses the acclient.cnf file, though the file must still exist. It does
not override a specification in the
wspaces file.