[p4] Versioning Client Specs

Russell C. Jackson rcjackson at alum.atu.edu
Tue Oct 23 20:13:14 PDT 2001

What we do is this:

1. Create the desired client.
2. Run p4 client -o > clientname.txt
3. Check clientname.txt into the corresponding project tree in Perforce.

Now in the build script:

1. Sync this file using a generic client.
2. Run p4 client -i < clientname.txt (This updates the actual build client
to have the view that is in the checked in file.)
3. Perform a full sync on the client you just updated.
4. Create the label.
5. Start the build.

Using this method, we just make all client changes to clientname.txt and
they automatically get included in the next build, and in the build label
for reproducibility.

There were some replies to the thread about using p4 print on clientname.txt
rather than having to worry about a generic client and syncing the file, but
either way will work.


Russell C. Jackson
rcjackson at alum.atu.edu

-----Original Message-----
From: perforce-user-admin at perforce.com
[mailto:perforce-user-admin at perforce.com]On Behalf Of Kevin Towers
Sent: Tuesday, October 23, 2001 4:33 PM
To: perforce-user at perforce.com
Subject: [p4] Versioning Client Specs

We would like to define a client spec (view) for each project.  This client
spec would be shared by everyone working on a given project.  This client
would specify the mapping from the depot into each developer's workspace.
The project build scripts could be tailored specifically to work within that
workspace context (parent directories, etc).  So in order to rebuild a
project from scratch, you would need to retrieve the client spec first, then
sync to the head revision of the depot view and type 'make' (or whatever).

A few weeks ago, there was a thread that discussed methods of versioning
client specs.  Some user's had a special place in the depot where all
project related client specs would be stored.  This was supposed to get
around the chicken and the egg problem.  There would be one client spec per

My questions are:  How would this work with labels?  Is the client spec also
part of the label?  A workspace cannot be sync'd to a label contents unless
the client spec contains the appropriate mappings (used at the time the
label was made).  How do I get around this problem?

Any help would be appreciated.

Kevin Towers
Omnex Control Systems
perforce-user mailing list  -  perforce-user at perforce.com

More information about the perforce-user mailing list