I would like to know if I can map a file or directory to multiple local copies with perforce.
I know that P4V really allows me to do this, but I came across very strange behavior from the client, and I suspect that this is not working.
I do not plan to modify any of these files, I need this to recreate the same directory structure that is necessary to create my own source tree (I do not want to create a huge branch if I know that I only need to modify several files, but I also donβt want to create additional workspaces, because switching from them takes too much time).
You are not allowed to do this because it leads to Bad Things. You can only display the depot file in only one local location and vice versa. You can map two depot folders in the same local folder, but you have to make it so that the files in the local folder go only to one storage location (well, this will ignore early mappings that conflict).
Branches cannot be "large" because Perforce will make shadow copies until you make any changes. In general, you should branch out the whole tree. Then you can have a workspace for each branch (preferred) or one workspace that displays everything (still doable).
( - , ... , , ? p4v " " , . , . p4v).
, ? , . , , . :
//depot/src/... //my-test-workspace/src_from_depot/... //depot/doc/... //my-test-workspace/doc_from_depot/...
src doc src_from_depot doc_from_depot . - , , - , , , .
src_from_depot
doc_from_depot
, , . , .
. , . p4 sync , . ( > 500 . , > 30 ), 10 , 10 . .
p4 sync
, , , .
I also ran into this problem. I have files / directories that are shared across multiple branches. Shared files / directories must be present in a specific structure in each branch for compilation.
The solution that worked for me was to put the shared files / directories in a separate place. This supports the 1: 1 matching requirement.
Then symbolically link the shared file / directories to each branch for compilation purposes.