Perforce 中的 Overlay Mappings 设置
在 Perforce 可以把多个 depot 位置映射到同一个 workspace 的位置。这种做法称为: Overlay Mapping ,在 “ View work space mapping as text ”窗口中,在映射条目前加一个“ + ”号就可以了。
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/...
In Perforce, you can have a many-to-one mapping but you cannot have a one-to-many mapping. You cannot sync same file to 2 locations. you need to provide it explicit list of what you want to sync. Something like this:
//depot/adir/... //cws/build/AA/adir/...
+//depot/adir/exception.c //cws/build/BB/adir/exception.c
Using wildcards in workspace views
Wildcard | Description |
---|---|
* | 匹配除斜线(目录分隔符)外的任意字符。 Matches anything except slashes. Matches only within a single directory. Case sensitivity depends on your platform. |
… | Matches anything except slashes. Matches only within a single directory. Case sensitivity depends on your platform. |
%%1 - %%9 | Positional specifiers for substring rearrangement in filenames. |
*
与 %%1
的区别在于,前者可以匹配目录,而后者不匹配目录。