p4 view mapping及其特殊字符

p4 view mapping及其特殊字符


p4 中三种view :client views, branch views, and label views.





3)在client views中可以在mapping的最前面有+,表示叠加的效果,不同于一般的覆盖。



//depot/v1/... "//ws/version one/..."

“//depot/document 2/..." //ws/document2/...

“-//depot/document 2/file2" //ws/document2/file2




ASCII expansion











client view实例: 


Client View

Sample Mapping

Full client workspace mapped to entire depot

//depot/... //ws/...

Full client workspace mapped to part of depot

//depot/dir/... //ws/...

Some files in the depot aremapped to a different part of the client workspace

//depot/... //ws/...
//depot/rel1/... //ws/release1/...

Some files in the depot areexcluded from the client workspace

//depot/dir/... //ws/...
-//depot/dir/exclude/... //ws/dir/exclude/...

Files in the client workspace are mapped to different names than their depot names.

//depot/dir/old.* //ws/renamed/new.*

Portions of filenames in the depot are rearranged in the client workspace

//depot/dir/%%1.%%2 //ws/dir/%%2.%%1

The files do not map the same way in each direction. The second line takes precedence, and the first line is ignored.

//depot/dir1/... //ws/build/...
//depot/dir2/... //ws/build/...

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

//depot/dir1/... //ws/build/...
+//depot/dir2/... //ws/build/..

The Perforce system allows the use of three wildcards:
Matches all characters except slashes within one directory.
Matches all files under the current working directory and all subdirectories. (matches anything, including slashes, and does so across subdirectories)
%%1 - %%9
Positional specifiers for substring rearrangement in filenames, when used in views.
For example:
Files in the current directory starting with J
All files called help in current subdirectories
All files under the current directory and its subdirectories
All files under the current directory and its subdirectories, that end in .c
All files under /usr/bruno
All files in the workspace or depot that is named bruno_ws
All files in the depot
All files in all depots
posted @ 2013-04-09 20:17  iTech  阅读(1485)  评论(0编辑  收藏