Saturday 6 November 2010

how to write this perforce client spec?

In perforce, there is a strong requirement that there be a one-to-one relationship between the depot and a workspace. From the doc:

All views construct a one-to-one mapping between files in the depot and the files in the client workspace, branch, or label. If more than one mapping line refers to the same file(s), the earlier mappings are overridden. Mappings beginning with a hyphen (-) specifically exclude any files that match that mapping. In client views, mappings beginning with a plus sign (+) overlay previous mappings. (Overlay mappings do not apply to branch or label views.)

so a mapping like:

//depot/adir/... //cws/build/AA/adir/...//depot/adir/... //cws/build/BB/adir/...

only activates the second line (which wins the conflict).

To do what you want, you need to use two different clients (workspaces) each having one line of your example.

You could look at overlay mappings, and maybe work around your problem:

An overlay mapping is used to map files from more than one depot directory into the same place in the workspace.

//depot/dir1/... //cws/build/...+//depot/dir2/... //cws/build/...

View the original article here

No comments:

Post a Comment