Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistInlinesWorkflow.php
| Show All 22 Lines | EOTEXT | ||||
| ); | ); | ||||
| } | } | ||||
| public function getArguments() { | public function getArguments() { | ||||
| return array( | return array( | ||||
| 'revision' => array( | 'revision' => array( | ||||
| 'param' => 'revision_id', | 'param' => 'revision_id', | ||||
| 'help' => | 'help' => | ||||
| "Display inline comments for a specific revision. If you do not ". | 'Display inline comments for a specific revision. If you do not '. | ||||
| "specify a revision, arc will look in the commit message at HEAD.", | 'specify a revision, arc will look in the commit message at HEAD.', | ||||
| ), | ), | ||||
| 'root' => array( | 'root' => array( | ||||
| 'param' => 'directory', | 'param' => 'directory', | ||||
| 'help' => "Specify a string printed in front of each path.", | 'help' => 'Specify a string printed in front of each path.', | ||||
| ), | ), | ||||
| ); | ); | ||||
| } | } | ||||
| public function requiresConduit() { | public function requiresConduit() { | ||||
| return true; | return true; | ||||
| } | } | ||||
| Show All 10 Lines | if ($this->getArgument('revision')) { | ||||
| $revision_id = $this->normalizeRevisionID($this->getArgument('revision')); | $revision_id = $this->normalizeRevisionID($this->getArgument('revision')); | ||||
| } else { | } else { | ||||
| $revisions = $this->getRepositoryAPI() | $revisions = $this->getRepositoryAPI() | ||||
| ->loadWorkingCopyDifferentialRevisions($this->getConduit(), array()); | ->loadWorkingCopyDifferentialRevisions($this->getConduit(), array()); | ||||
| $revision_id = head(ipull($revisions, 'id')); | $revision_id = head(ipull($revisions, 'id')); | ||||
| } | } | ||||
| if (!$revision_id) { | if (!$revision_id) { | ||||
| throw new ArcanistUsageException("No revisions found."); | throw new ArcanistUsageException('No revisions found.'); | ||||
| } | } | ||||
| $comments = array_mergev( | $comments = array_mergev( | ||||
| $this->getConduit()->callMethodSynchronous( | $this->getConduit()->callMethodSynchronous( | ||||
| 'differential.getrevisioncomments', | 'differential.getrevisioncomments', | ||||
| array( | array( | ||||
| 'ids' => array($revision_id), | 'ids' => array($revision_id), | ||||
| 'inlines' => true, | 'inlines' => true, | ||||
| Show All 34 Lines | |||||