使用Phabricator提交diff,进行CodeReview代码,相关操作

首先使用Phabricator需要配置相关的PHP环境变量,配置过程详见此链接
Windows系统下Phabricator的Arcanist配置安装
其中的步骤只需要看1 2 3 5 6 即可,如下图所示:

链接步骤如下:
在这里插入图片描述
在这里插入图片描述
此过程安装结束进入IDEA进行配置编辑器
在IDEA左下角的Terminal输入操作命令
在这里插入图片描述

  1. 查看编辑器(默认是vim,但是Windows与这个有冲突所以本人用的Notepad++)

输入命令 $ arc get-config editor

D:\wks\calendar>arc get-config editor
editor

       Current Value: "vim"
      Current Source: project
(Run with --verbose for more details.)
D:\wks\calendar>
  1. 查看本项目的配置(没有配置的话会显示如下)

输入命令 $ arc get-config editor --verbose

D:\wks\calendar>arc get-config editor --verbose
editor

    Command to use to invoke an interactive editor, like `nano` or `vim`.
    This setting overrides the EDITOR environmental variable.

       Example Value: "nano"

       Current Value: "vim"
      Current Source: project

         local Value: -
       project Value: "vim"
          user Value: -
        system Value: -
       default Value: -

D:\wks\calendar>
  1. 配置Notepad++为编辑器

输入命令 $ arc set-config editor --local ““D:Notepad++存储路径\notepad++.exe” -multiInst -nosession”

D:\wks\calendar>arc set-config editor --local " \"C:\Program Files\Notepad++\notepad++.exe\" -multiInst -nosession"
Set key "editor" = " "C:\Program Files\Notepad++\notepad++.exe" -multiInst -nosession" in local config (was null).

D:\wks\calendar>
  1. 查询编辑器(确认您是否配置成功)

输入命令 $ arc get-config editor --verbose

D:\wks\calendar>arc get-config editor --verbose
editor

    Command to use to invoke an interactive editor, like `nano` or `vim`.
    This setting overrides the EDITOR environmental variable.

       Example Value: "nano"

       Current Value: " "D:Notepad++存储路径\notepad++.exe" -multiInst -nosession"
      Current Source: local

         local Value: " "D:Notepad++存储路径\notepad++.exe" -multiInst -nosession"
       project Value: "vim"
          user Value: -
        system Value: -
       default Value: -

D:\wks\calendar>

显示上图即为配置成功!

配置好环境,代码写完交给Lead进行diff操作如下

首次diff:
	先  git status   
	接着  git  add .
	随后  git status
	然后  git commit -m "填写备注"
	最后arc diff --create
	自动弹出NotePad++进行备注填写:{
		Summary:(备注一下这次提交做的什么)
		Test Plan: yes
		Reviewers: (填写审核人)zhong.zheng pengfei.you 
	}--保存退出就好
	控制台自动打印地址,复制浏览器查看  发给审核人!
	
	
代码修改过后diff:
	先  git status   
	接着  git  add .
	随后  git status
	然后  git commit -m "填写备注"
	最后arc diff --update 上次的版本号
	自动弹出NotePad++进行备注填写:{
		第一行备注主题(可自愿进行修改);
		Updating 版本号:diff版本信息;
	}--保存退出就好
	控制台自动打印地址,复制浏览器查看  发给审核人!

猜你喜欢

转载自blog.csdn.net/qq_21194601/article/details/84883513