[p4] mapping 1 area of depot to multiple areas of workspace

Robert Cowham robert at vaccaperna.co.uk
Fri Oct 13 03:54:50 PDT 2006


> I've not actually tried it, but could you use overlay mapping?

Overlay mappings don't work like this. You will never get 2 copies of the
same file mapped out in a single workspace.

A mapping line that begins with a + overlays the later mapping on the
earlier one: if files match both the earlier and later mappings, then the
file matching the later mapping is used. Overlay mappings are only allowed
on client views, and make it possible to map multiple server directories to
the same client directory.

For an example of overlay mapping usage, see:

http://www.robertcowham.com/blog/scm/p4_sparse_branching.html

> IE:
> \\Source\OS1\Private\...   \\Target\OS1\Private\...
> \\Source\Common\...       \\Target\OS1\Common\...
> \\Source\OS2\Private\...   \\Target\OS2\Private\...
> +\\Source\Common\...     \\Target\OS2\Common\...
> \\Source\OS3\Private\...   \\Target\OS3\Private\...
> +\\Source\Common\...     \\Target\OS3\Common\...
> 
> etc... ? The caveat being that only \\Target\OS1\Common can 
> check in changes to the Common files, it's not pleasant, but 
> it may be the path of least resistance.



More information about the perforce-user mailing list