]> khamidou — GitHub mirrors - arcanist.git/commit
In `arc diff`, always check that you own a revision before trying to do anything...
authorepriestley <git@epriestley.com>
Thu, 25 Oct 2012 23:27:57 +0000 (16:27 -0700)
committerepriestley <git@epriestley.com>
Thu, 25 Oct 2012 23:27:57 +0000 (16:27 -0700)
commit519e23f3a4fb161b5b48cbbd4f48139ebc6292ca
tree3b089ac72b2b199b7b8c39ab4352bd548a40a3bc
parent6be5cfd104b5977513e2062b8a1e461bfadb2fdd
In `arc diff`, always check that you own a revision before trying to do anything with it

Summary:
Some users assume they can update anything, not just revisions they own (see https://github.com/facebook/arcanist/issues/54).

Currently, if you `arc patch` or `arc amend` and get a commit message, then `arc diff` for a revision you don't own, we:

  - Fail early with a very confusing message ("You can not review a revision you own!") if you are on the "Reviewers" line, until D3820.
  - Or fail very very late with a good error message, but after lint, unit and update messages.

Instead, check that you own the revision as early as we can.

Test Plan: Tried to update revisions I didn't own, got good error messages early on (with D3820).

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran
Differential Revision: https://secure.phabricator.com/D3821
src/workflow/ArcanistDiffWorkflow.php