gpt4 book ai didi

Perforce 解决方法添加带有 '@' 的文件

转载 作者:行者123 更新时间:2023-12-04 19:41:44 28 4
gpt4 key购买 nike

来自 design , Perforce 不允许使用通配符的文件名 @#%*添加。它给出了这个错误:

Can't add filenames with wildcards [@#%*] in them.
Use -f option to force add.

但是,我的 SASS 文件具有 @在它们上支持mixin。例如:
carbon-fibre-@2X.png
sprite-dashboard-@2X.png

什么是最好的 解决方法 将这些文件添加到 Perforce,对 checkin 、 checkout 、编译、构建和部署流程的干扰最小?

最佳答案

您可以添加带有 Perforce 通配符的文件。作为'p4帮助添加'页面文件:

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.



从那时起,使用编码的“%40”统一引用文件名的要求很烦人,我同意,但它 工作。

这是一个简短的例子:
$ 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

关于Perforce 解决方法添加带有 '@' 的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37952591/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com