Perforce Can';不要使用Python打印
我不确定这是P4API的错误还是我使用p4python的问题Perforce Can';不要使用Python打印,perforce,perforce-client-spec,p4python,Perforce,Perforce Client Spec,P4python,我不确定这是P4API的错误还是我使用p4python的问题 p4.run_print("-q", "-o " + targetPath, depotFile + "#" + rev) …给出了一个例外 Traceback (most recent call last): File "C:\pyTools\p4test.py", line 218, in <module> main() File "C:\pyTools\p4test.py", line 70, in
p4.run_print("-q", "-o " + targetPath, depotFile + "#" + rev)
…给出了一个例外
Traceback (most recent call last):
File "C:\pyTools\p4test.py", line 218, in <module>
main()
File "C:\pyTools\p4test.py", line 70, in main
copy_changes(p4, args.copy[0], args.copy[1], clientStream, targetRoot)
File "C:\pyTools\p4test.py", line 204, in copy_changes
p4_print_to_path(p4, change['depotFile'][i], change['rev'][i], targetPath) # Get the file@rev at the target path
File "C:\pyTools\p4test.py", line 215, in p4_print_to_path
p4.run_print("-q", "-o " + targetPath, depotFile + "#" + rev)
File "C:\Python33\lib\site-packages\P4.py", line 610, in run_print
raw = self.run('print', args, **kargs)
File "C:\Python33\lib\site-packages\P4.py", line 533, in run
result = P4API.P4Adapter.run(self, *self.__flatten(args))
P4.P4Exception: [P4#run] Errors during command execution( "p4 print -q -o C:/_code/target\PurleyPkg\Tool\GenBiosId\BiosIdD.env //CP_Server_BIOS/Skylake_Trunk/PurleyPkg/Tool/GenBiosId/BiosIdD.env#35" )
[Error]: "can't create directory for C:/_code/target\\PurleyPkg\\Tool\\GenBiosId\\BiosIdD.env\nmkdir: C:: The filename, directory name, or volume label syntax is incorrect. "
…这将创建文件的路径并正确复制文件。看来我已经正确地构造了对API的调用。
我做错什么了吗?
这与Python3.x和Python2.x有关吗?我还没有试过使用2.x。
是否有人能够通过p4python模块使用print命令
我找不到P4API的源代码(不确定该部分是否为公共部分)。我有p4python源代码,但调试路径在第533行结束,调用了P4API,我只将其作为二进制文件
我找不到perforce模块的公共bug跟踪器。如果有一个指针,我可以搜索他们的bug并提交一个,我将不胜感激。这是一个误导:
p4 [g-opts] print [ -a -A -o outfile ] [ -q ] file[revRange] ...
在-o和输出文件的开头之间没有空格。我在这个问题上的问题是,我在'-o'后面加了一个空格
"-o " + targetPath
删除空间解决了这个问题。Hmm,我打算建议尝试
p4。运行打印(“-q”、“-o”、targetPath、depotFile+“#”+rev)
。如果你有机会,你也能试试吗?我猜删除空格正好起作用,因为P4解析参数的方式。是的,P4.run_print(“-q”、“-o”、targetPath、depotFile+“#”+rev)也起作用。p4.run_print(“-q”、“-o”、targetPath、depotFile+“#”+rev)不起作用(可能是预期的)。
"-o " + targetPath