我从Gitlab下载代码,然后创建一个新分支,更新一些文件并创建评论。然后,我添加一个文件,执行arc diff --allow-untracked
,它报告Usage Exception: There are several revisions which match the working copy:
。我执行arc diff --allow-untracked --update D75
以更新现有评论,但它会创建一个新评论。
Linting...
No lint engine configured for this project.
Running unit tests...
No unit test engine is configured for this project.
SKIP STAGING No staging area is configured for this repository.
Updating commit message...
Created a new Differential revision:
Revision URI: http://codereview.domain.com/D76
我尝试了很多次,但是它总是会创建一个新的修订版。如何使用arc diff --update
?
答案 0 :(得分:0)
您不需要--update
,但确实需要指定更改的基础,因此,要更新与当前HEAD相关的修订,请尝试以下操作:
arc diff
HEAD^
如果您有两次提交,则需要使用 HEAD^^
。
要更新当前分支上的所有内容,请执行以下操作:
arc diff
parent-branch
因此,假设您当前的分支是从master分支出来的:
arc diff
master
奥术家文档详细介绍了该主题,因此,为了更全面地了解arc diff
如何决定要提交的提交,请阅读Arcanist User Guide: Commit Ranges。