Using read-only clients in automated builds
Build automation scripts, which routinely create, sync, and tear down
clients, may fragment the db.have
table over time. To avoid
this, you can specify the type readonly
for these clients.
Such clients cannot add, delete, edit, integrate, or submit files, but
this should not be an issue in build scripts.
A readonly client is assigned its own personal db.have
database table, and the location of this table is specified using the
client.readonly.dir
configurable.
To set up a read-only client:
-
Set the
client.readonly.dir
configurable to the directory where thedb.*
tables for the client should be stored.For example, if you create a read-only client whose name is
myroc
and you setclient.readonly.dir
to/perforce/1
, then syncing files using this client will write to the following database:/perforce/1/server.dbs/client/hashdir/db.myroc
- Set the
Type
field of the client spec toreadonly
.
The client storage type cannot be changed after client is created. For example, a readonly
client cannot be changed into a writeable
client.