我正在编写一个Python脚本,其中使用以下命令打印perforce的所有流信息:
p4 -ztag stream -o //streams/xyz
输出如下:
^{pr2}$这样输出就来了。
我是从python打电话来的:
subprocess.Popen(['p4','-ztag','stream','-o',//streams/xyz], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]. Now, i want to display only Path fields not the rest i.e owner, update, access, etc. So, how will i get this?
现在我只想得到一个名为“重新映射”的字段的信息,而不是其他字段,如所有者、家长等
那么,如何使用filter
命令只获取特定字段?在
我建议使用P4Python API,这将使它非常简单:
http://www.perforce.com/perforce/doc.current/manuals/p4script/python.p4.html#python.p4.fetch_spectype
http://www.perforce.com/perforce/doc.current/manuals/p4script/python.p4_spec.html
将得到重新映射字段的值等
相关问题 更多 >
编程相关推荐