Arcanist是Phabricator的命令行接口.php
# sudo apt-get install php5 php5-curl # ubuntu 系统 # sudo yum install php5 # centos 系统 # cd /usr/local/bin # 安装目标路径, 如目录不在PATH, 则将 export PATH=$PATH:/usr/local/bin 加入 .bashrc # git clone https://github.com/phacility/libphutil.git # git clone https://github.com/phacility/arcanist.git # ln -s arcanist/bin/arc arc # 建立软连接, 使arc命令位于PATH中 在.bashrc加入下面一行, 使arc命令能够自动补全: source /usr/local/bin/arcanist/resources/shell/bash-completion
(或用 npm 安装: npm install -g arcanist , 无需配置, 参见 https://www.npmjs.com/package/arcanist)git
在git库目录建立 .arcconfig, 内容以下:github
{ "phabricator.uri" : "https://你的phabricator网站的域名" }
安装证书:web
# arc install-certificate
会提示你用浏览器打开一个连接,获取一个Token,复制该 Token, 粘贴到终端便可shell
arc help --full # 查看详细帮助 arc diff # 提交默认的diff arc diff xxx --preview # 提交针对某个分支的commit,并只生成diff文件,不在web端建立revision arc which # 查看arc diff 会提交哪一个范围的diff arc land # 提交代码,删除该分支 或 使用 git push arc list # 查看有哪些revision和其状态
工做流程:npm
Test Plan - 必填,详细说明你的测试计划; Reviewers - 必填,审查人的帐户,多个使用","隔开; Subscribers - 非必填订阅人,多个使用","隔开。
arc diff --update D(id)
继续 reviewarc land
, arc 会将你当前分支合并的 master 上,并删除当前分支参考:json
http://share.zuijiao.net/?p=22ubuntu
https://secure.phabricator.com/book/phabricator/article/arcanist/centos
https://secure.phabricator.com/book/phabricator/浏览器
https://www.npmjs.com/package/arcanist