Page MenuHomePhabricator

D8709.id20666.diff
No OneTemporary

D8709.id20666.diff

diff --git a/src/workflow/ArcanistLandWorkflow.php b/src/workflow/ArcanistLandWorkflow.php
--- a/src/workflow/ArcanistLandWorkflow.php
+++ b/src/workflow/ArcanistLandWorkflow.php
@@ -405,9 +405,7 @@
} else {
$revisions = $repository_api->loadWorkingCopyDifferentialRevisions(
$this->getConduit(),
- array(
- 'authors' => array($this->getUserPHID()),
- ));
+ array());
}
if (!count($revisions)) {
@@ -435,6 +433,22 @@
$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 ".

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 19, 3:28 AM (3 h, 10 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7014342
Default Alt Text
D8709.id20666.diff (1 KB)

Event Timeline