zoukankan      html  css  js  c++  java
  • phabricator 结合 arcanist 使用

    简介

    arcanist 是 phabricator 接口的命令工具,主要用于提交 diff 和 push review 通过的commit。

    安装

    下载源码,然后指定系统的环境变量即可

    $ some_install_path/ $ git clone https://github.com/phacility/libphutil.git
    $ some_install_path/ $ git clone https://github.com/phacility/arcanist.git
    

    指定环境变量

    -- 修改 .bash_profile(如果装有 zsh, 则修改 .zshrc),下面的 /Users/Grissom/mydocs/arc/arcanist/bin 就是我本机 arc 源码所在的路径
    $ export PATH=${PATH}:/usr/local/mysql/bin:/Users/Grissom/mydocs/arc/arcanist/bin
    
    -- 然后运行以下命令使之起效 
    $ source .bash_profile 
    
    -- 查看是否安装好
    $ arc help
    
    -- 配置arc的默认编辑器,我使用vim
    $ arc set-config editor "vim"
    
    --配置默认的phabricator的uri,uri为团队的phabricator主页的url
    $ arc set-config default <your phabricator uri>
    
    --在项目的根目录下建.arcconfig配置文件,文件中至少要填入以下内容
    {
      "project.name": "对应 phabricator 的 project name",
      "phabricator.uri": "<your phabricator uri>"
    }
    
    -- 为项目安装证书,用于phabricator的认证。
    $ arc install-certificate
    -- 上面命令会提示到指定 uri 获取 token, 然后粘贴下去,就 ok 了
    
    

    使用

    --创建本地分支
    $ git checkout -b b_test_0729
    -- 修改代码, 然后提交
    $ git add . && git commit -m "test"
    
    --创建 revision 并提交到 phabricator
    $ arc diff b_test_0729
    
    --上面命令会弹出 vim ,需要填写一些信息,如下
    
    <<Replace this line with your revision title>  -- title 必填
    
    Summary:  -- 简述 必填
    
    Test Plan:  -- 测试计划 必填,如果没有,可以填: NO
    
    Reviewers:  -- 指定审核人,必填,注意审查人是在 phabricator 上注册的用户账号,而且 Reviewers: 与审查人之间不能有空格,这是个坑
    
    Subscribers: -- 可删除
    
    # NEW DIFFERENTIAL REVISION
    # Describe the changes in this new revision.
    #
    # arc could not identify any existing revision in your working copy.
    # If you intended to update an existing revision, use:
    #
    #   $ arc diff --update <revision>
    
    
    

    提交

    如果 Reviewer 审查通过,就可以用 arc 进行提交了

    $ arc land  -- 会自动合并到 origin master 并且删除当前本地分支
    
    

    参考

    [https://secure.phabricator.com/book/phabricator/article/arcanist_windows/] (windows 系统参考 https://secure.phabricator.com/book/phabricator/article/arcanist_windows/)
    https://sezina.github.io/2013/07/16/phabricatorming-ling-xing-gong-ju-arcanistde-ji-ben-yong-fa/
    https://www.slahser.com/2016/02/29/Arcanist%E7%94%A8%E6%B3%95%E7%AE%80%E4%BB%8B/

  • 相关阅读:
    软件工程
    ROR
    全息技术(Holographic technique)
    VR技术、AR技术、MR技术
    人工智能(AI)
    机器学习(Machine Learning)
    hdoj Scaena Felix
    周赛题解
    Good Luck in CET-4 Everybody!(博弈)
    Paths on a Grid(规律)
  • 原文地址:https://www.cnblogs.com/grissom007/p/7257297.html
Copyright © 2011-2022 走看看