Map different depot locations to the same workspace location
Overlay mappings enable you to map files from more than one depot
directory to the same place in a workspace. To overlay the contents of a
second directory in your workspace, use a plus sign (+
) in
front of the mapping.
Example Overlaying multiple directories in the same workspace
Joe wants to combine the files from his projects when they are synced to his workspace, so he has constructed a view as follows:
View: //Acme/proj1/... //joe/project/... +//Acme/proj2/... //joe/project/...
The overlay mapping //Acme/proj2/...
maps to
//joe/project
, and overlays the first mapping. Overlay
mappings do not conflict. Files (even deleted files) in
//Acme/proj2
take precedence over files in
//Acme/proj1
. If //Acme/proj2/file.c
is
missing (as opposed to being present, but deleted), then
//Acme/proj1/file.c
is mapped into the workspace
instead.
When multiple directories are overlaid in this way, only the last directory is writable.
Overlay mappings are useful for applying sparse patches in build environments.