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
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值