1

I already figured out how to branch and submit my changes however since I use a project management platform like Jira I also need to write a description on each check ins. This is my code for branching :

result = p4.run("populate", Path+"/...@"+ Changelist, destination)

Where do I write the description? Right now the description is the command itself.

1 Answer 1

0
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

so:

   result = p4.run(
       "populate", 
       "-d",
       "My awesome description",
       f"{src_path}/...@{changelist}", 
       f"{dst_path}/..."
    )

You can also use the integrate and submit commands (note that this requires that dst_path is part of your client view since the files will be opened on your client prior to submit):

p4.run("integrate", f"{src_path}/...@{changelist}", f"{dst_path}/...")
p4.run("submit", "-d", "My awesome description")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.