问题
I created a client using the p4 client and got the latest code. Then I did p4 edit
to edit files. I then, created a change list with my modified files using the command p4 change
. Now, I would like to submit my code changes for review before committing them. I believe our perforce is integrated with swarm.
Now, how do I submit these code changes using the command line?
I tried p4 help. It does not have any clue.
On a side note (irrelevant to the question): I damn hate perforce. Their documentation is very bad. And searching google for specific things on perforce leads to the bad documentation pages perforce has on its website. And all videos they have on various perforce tasks are using the GUI, not the command line.
回答1:
To initiate a review in Swarm, your changelist description must include "#review" either on its own line, or separated by whitespace. Optionally you can include "@username" on or more times to require those people as reviewers. Shelve the changelist with p4 shelve -c changelist#. A trigger on the server scans the descriptions, and if it sees the #review keyword it starts the review process.
回答2:
What you're looking for is the "p4 shelve" command.
来源:https://stackoverflow.com/questions/41905112/submit-a-change-for-review-in-swarm-command-line-using-perforce