我在Perforce中使用p4python撤消更改时遇到了一个问题,因为我已经提交了我现在想要撤消的更改列表。我的想法是首先创建一个更改列表,然后运行撤消。然而,我做错了一些事情,文件无法撤消。
# new_cl is the created changelist
# cl_to_undo is the changelist to undo.
# description is string
P4.run("undo", '-c'+new_cl, filePath+"@" + cl_to_undo, description)
# Submit
P4.submit(new_cl)
会很感激任何帮助的。谢谢。
1条答案
按热度按时间xggvc2p61#
undo
命令不接受description
参数。您应该在创建
new_cl
的Description
字段时设置它(假设您的脚本中有一些代码可以创建一个包含p4.get_change
和p4.save_change
的挂起更改列表,并且它设置了一个描述--将您的description
文本放在那里)。