我已经知道了如何分支和提交我的更改,但是由于我使用了像Jira这样的项目管理平台,所以我也需要在每个签入上写一个描述。这是我的分支代码:
result = p4.run("populate", Path+"/...@"+ Changelist, destination)
我该在哪里写描述?现在,描述就是命令本身。
发布于 2020-04-04 23:47:12
C:\Perforce\test\python>p4 help populate
populate -- Branch a set of files as a one-step operation
p4 populate [options] fromFile[rev] toFile
p4 populate [options] -b branch [-r] [toFile[rev]]
p4 populate [options] -b branch -s fromFile[rev] [toFile]
p4 populate [options] -S stream [-P parent] [-r] [toFile[rev]]
options: -d description -f -m max -n -o
因此:
result = p4.run(
"populate",
"-d",
"My awesome description",
f"{src_path}/...@{changelist}",
f"{dst_path}/..."
)
您还可以使用integrate
和submit
命令(请注意,这要求dst_path
是客户端视图的一部分,因为在提交之前将在客户端打开文件):
p4.run("integrate", f"{src_path}/...@{changelist}", f"{dst_path}/...")
p4.run("submit", "-d", "My awesome description")
https://stackoverflow.com/questions/61035594
复制相似问题