diff --git a/src/workflow/ArcanistLandWorkflow.php b/src/workflow/ArcanistLandWorkflow.php index be069800..1376e9f6 100644 --- a/src/workflow/ArcanistLandWorkflow.php +++ b/src/workflow/ArcanistLandWorkflow.php @@ -405,9 +405,7 @@ EOTEXT } else { $revisions = $repository_api->loadWorkingCopyDifferentialRevisions( $this->getConduit(), - array( - 'authors' => array($this->getUserPHID()), - )); + array()); } if (!count($revisions)) { @@ -435,6 +433,22 @@ EOTEXT $rev_title = $this->revision['title']; $rev_auxiliary = idx($this->revision, 'auxiliary', array()); + if ($this->revision['authorPHID'] != $this->getUserPHID()) { + $other_author = $this->getConduit()->callMethodSynchronous( + 'user.query', + array( + 'phids' => array($this->revision['authorPHID']), + )); + $other_author = ipull($other_author, 'userName', 'phid'); + $other_author = $other_author[$this->revision['authorPHID']]; + $ok = phutil_console_confirm( + "This {$this->branchType} has revision 'D{$rev_id}: {$rev_title}' ". + "but you are not the author. Land this revision by {$other_author}?"); + if (!$ok) { + throw new ArcanistUserAbortException(); + } + } + if ($rev_status != ArcanistDifferentialRevisionStatus::ACCEPTED) { $ok = phutil_console_confirm( "Revision 'D{$rev_id}: {$rev_title}' has not been ".