Reputation: 3182
Phabricator's arcanist command line tool allows you to add a "diff" for revision. This is useful because you can quickly generate a diff which your colleagues can review.
Normally, running arc diff master
, for example, will prompt your for a diff message, a test plan, and some other information, and then create a diff on Phabricator.
However, I would like to run arc diff from a continuous integration server, therefore assuming yes to all questions and passing the message and test plan as an argument to the command. What I have now is:
arc diff master --allow-untracked
Still, it is assuming that it is being called from a human user, and asking for a message, which fails when called from a continuous integration server. How can skip the prompts?
Upvotes: 4
Views: 2629
Reputation: 169
the best practice is: You can prepare a template file like this. This file can be named msg.conf
${title}
Summary:
${summary_content}
修订人:
${reviewers}
订阅者:
RBA-DEV
Test Plan:
${test_plan}
and then you can generate some content you need to fill this template and then. you can rum this command:
arc diff --create --allow-untracked --skip-binaries --message-file msg.conf origin/master
Upvotes: 2
Reputation: 219
I think what you are looking for is the --verbatim
option.
Considering the changes are committed so that it has a commit message you can run a command like:
arc diff --verbatim --reviewers xxxx --uncommitted --allow-untracked
This implies you set the Test plan
to optional, else you have to specify it as well.
Finally you can also read revision info from a file using --message-file
.
Another approach would be:
arc diff --raw-command "git diff origin/master"
createrevision
conduit call as described here to create the revision:https://secure.phabricator.com/conduit/method/differential.createrevision/
Upvotes: 6