Creating a client from a template

You might want to create a client from a template when you want to create a client that is similar to an existing client (especially the view map). For example, you want to create a client that maps the mainline server code so that you can build it yourself. This might require multiple view map entries, so you want to base your client on one that already has those view maps defined.

Clients created on a commit server can be used as templates by clients created on the commit server or on any edge server.

A client bound to an edge server can be used as a template for clients on that same edge server. To use it as a template on a different edge server or on the commit server, its view map should be global (that is, copied to the commit server).

A client’s view map is made global when the client is modified and server.global.client.views=1 on both the edge server to which it is bound and on the commit server. You can create a client for an edge server or commit server based on an existing client template (bound to a different edge server) using a command like the following:

$ p4 client -t clientBoundToOtherEdge clientBoundToMyEdge

The newly created client will have its View map copied from the View map of the template client, with the client name on the right-hand side entries changed from the template client name (clientBoundToOtherEdge) to the new client name (clientBoundToMyEdge).