您可以在其中添加包含Perforce通配符的文件.作为’p4 help add’页面文档:
To add files with filenames that contain wildcard characters,
specify the -f flag. Filenames that contain the special characters
‘@’, ‘#’, ‘%’ or ‘*’ are reformatted to encode the characters using
ASCII hexadecimal representation. After the files are added, you
must refer to them using the reformatted file name, because Perforce
does not recognize the local filesystem name.
从那时起使用编码的’@’统一引用文件名的要求很烦人,我同意,但它确实有效.
这是一个简短的例子:
$touch 'carbon-fiber-@2X.png'
$p4 add 'carbon-fiber-@2X.png'
The file named 'carbon-fiber-@2X.png' contains wildcards [@#%*].
Can't add filenames with wildcards [@#%*] in them.
Use -f option to force add.
$p4 add -f 'carbon-fiber-@2X.png'
//depot/carbon-fiber-%402X.png#1 - opened for add
/path/to/carbon-fiber-@2X.png - empty, assuming text.
$p4 submit -d added-carbon-fibre
Submitting change 2.
Locking 1 files ...
add //depot/carbon-fiber-%402X.png#1
Change 2 submitted.
$p4 files //...
//depot/carbon-fiber-%402X.png#1 - add change 2 (text)
$p4 fstat //depot/carbon-fiber-%402X.png
... depotFile //depot/carbon-fiber-%402X.png
... clientFile /path/to/carbon-fiber-@2X.png
... isMapped
... headAction add
... headType text
... headTime 1466547058
... headRev 1
... headChange 2
... headModTime 1466547033
... haveRev 1