p4 view mapping及其特殊字符


p4 view mapping及其特殊字符

 

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

 

注意:

1)如果view中对同一个文件有多次mapping,则后面的覆盖前面的mapping。

2)以-开始的mapping,用来排除文件的mapping,一般用来排除一些目录下的某些子目录或文件。

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

 

文件或路径中的空格:

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

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

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

 

文件或路径中的其他特殊字符: 

Character

ASCII expansion

@

%40

#

%23

*

%2A

%

%25

 

 

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:
 
Wildcard
Meaning
*
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:
 
Expression
Matches
J*
Files in the current directory starting with J
*/help
All files called help in current subdirectories
./...
All files under the current directory and its subdirectories
./....c
All files under the current directory and its subdirectories, that end in .c
/usr/bruno/...
All files under /usr/bruno
//bruno_ws/...
All files in the workspace or depot that is named bruno_ws
//depot/...
All files in the depot
//...
All files in all depots
posted @ 2013-04-09 20:17  iTech  阅读(1877)  评论(0编辑  收藏  举报