Reputation: 729
I have an issue with undoing changes in Perforce using p4python given that I have sumitted the changelist that I now want to undo. My idea is first to create a changelist and then run the undo. However, Iam doing something wrong and the file doesnt get undone.
# 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)
Would appriciate any help. Thanks.
Upvotes: 0
Views: 257
Reputation: 71424
The undo
command doesn't take a description
argument.
C:\Perforce\test>p4 help undo
undo -- Undo a range of revisions
p4 undo [-n] [-c changelist#] file[revRange]
You should set the Description
field of new_cl
at the time you create it (presumably you have some code earlier in your script that creates a pending changelist with p4.get_change
and p4.save_change
, and it sets a description -- put your description
text in there).
Upvotes: 0