问题标签 [p4python]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - 如何为 Mac OS X 构建和安装 P4Python?
我一直无法为 Intel Mac OS X 10.5.5构建P4Python 。
这些是我的步骤:
- 我下载了 p4python.tgz(来自 http://filehost.perforce.com/perforce/r07.3/tools/)并将其扩展为“P4Python-2007.3”。
- 我下载了 p4api.tar(来自 http://filehost.perforce.com/perforce/r07.3/bin.macosx104x86/)并将其扩展为“p4api-2007.3.143793”。
- 我将“p4api-2007.3.143793”放入“P4Python-2007.3”并编辑 setup.cfg 以设置“p4_api=./p4api-2007.3.143793”。
我在 setup.py 之后添加了行 'extra_link_args = ["-framework", "Carbon"]' :
/li>我跑了
python setup.py build,得到:
$ python setup.py 构建
which gcc返回 /usr/bin/gcc 并gcc -v返回:
python -V返回 Python 2.4.3。
python - 是否可以将 P4Python API 与 IronPython 一起使用?
是否可以将 P4Python(perforce python api)与 IronPython 一起使用?我想使用 python api,因为它似乎比使用 Perforce API 的 p4.net 实现快得多,但是当我尝试将 p4 导入 IronPython 时,我收到以下错误。
.NET 4.0.30128.1 上的 IronPython 2.6.1 (2.6.10920.0) 键入“帮助”、“版权”、“信用”或“许可证”以获取更多信息。
导入 P4 Traceback(最近一次调用最后一次):文件“”,第 1 行,在文件“C:\Program Files\IronPython 2.6 for .NET 4.0\lib\site-packages\P4.py”中,第 210 行,在 ImportError : 没有名为 P4API 的模块
python - 为什么 P4Python 无法识别 P4CONFIG 设置?
我有以下代码:
通过以下方式调用:
并且正在输出:
当从命令行调用 script0.py 或使用 subprocess.check_call(shell=True) 时,它会输出正确的信息:
为什么 p4 对象在 shell=False 时无法识别 P4CONFIG 设置?
python - 在 osx-MountainLion 上安装 p4python 时出错
我有 Python 版本:Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
从http://www.perforce.com/product/components/apis#p4python下载 p4python
从ftp://ftp.perforce.com/perforce/r12.1/bin.darwin90x86_64下载 p4api
将提取的文件放入 p4python 目录
然后我运行:
我收到以下错误:
有任何想法吗?
python - 如何在 P4Python 中获取更改的类型
我正在尝试使用 P4Python,并希望找到一种方法来检查更改列表中每个文件的更改类型。我的意思是,我想知道它是否是修改,或者这个文件是否标记为 Add或Marked for Delete。
我的代码类似于
因此,我在更改列表中有文件列表,现在我可以遍历它们,例如,我希望删除标记为删除的文件。
非常感谢您的帮助!
python - 如何获取已集成在 CL 范围内的更改?
给定 src 和 dest 分支,我如何在 dest/...@lower,upper 中找到从 src 集成的内容?
P4.run_integrated 抱怨它不接受修订规范。
python - 无法在 python 中使用 p4 模块
我正在使用 ubuntu 12.04 64 位,并且我已经在其中安装了 p4python。我尝试导入 p4 模块,但它给了我以下错误
import p4 Traceback(最近一次调用最后一次):文件“”,第 1 行,在 ImportError:没有名为 p4 的模块
有人可以帮帮我吗??
perforce - p4python:获取 diff2 表单库
我想检索下一个命令的输出(其中 p4 是标准 perforce 客户端):
在终端它正在产生这样的东西:
假设我在 python 中有下一个脚本:
执行 python 脚本后,我将收到类似的内容:
仓库中包含修订但没有差异的文件列表。
有什么建议么?
python - how to get all change numbers from sync - p4python
I periodically get a p4 sync and want to know what actually got synced.
So I get the return from p4.run_sync which is a list of dicts per change (as far as I understood)
when I print the keys it looks like that:
So only in the first dict there is a change number!
How do I get the others? I currently browse the depotFiles of the other dicts and get the headChange from p4.fstat.. but this seems quite hacky...
I'd actually like each change number that was synced to fetch a describe right away.
Or is there a more proper way todo this? Thanks!