Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistDiffWorkflow.php
| Show First 20 Lines • Show All 519 Lines • ▼ Show 20 Lines | $event = $this->dispatchEvent( | ||||
| 'unitResult' => $unit_result, | 'unitResult' => $unit_result, | ||||
| )); | )); | ||||
| $this->pushChangesToStagingArea($this->diffID); | $this->pushChangesToStagingArea($this->diffID); | ||||
| $this->updateLintDiffProperty(); | $this->updateLintDiffProperty(); | ||||
| $this->updateUnitDiffProperty(); | $this->updateUnitDiffProperty(); | ||||
| $this->updateLocalDiffProperty(); | $this->updateLocalDiffProperty(); | ||||
| $this->updateGeneratedDiffProperty(); | |||||
| $this->resolveDiffPropertyUpdates(); | $this->resolveDiffPropertyUpdates(); | ||||
| $output_json = $this->getArgument('json'); | $output_json = $this->getArgument('json'); | ||||
| if ($this->shouldOnlyCreateDiff()) { | if ($this->shouldOnlyCreateDiff()) { | ||||
| if (!$output_json) { | if (!$output_json) { | ||||
| echo phutil_console_format( | echo phutil_console_format( | ||||
| "%s\n **%s** __%s__\n\n", | "%s\n **%s** __%s__\n\n", | ||||
| ▲ Show 20 Lines • Show All 1,870 Lines • ▼ Show 20 Lines | private function updateLocalDiffProperty() { | ||||
| $local_info = $this->getRepositoryAPI()->getLocalCommitInformation(); | $local_info = $this->getRepositoryAPI()->getLocalCommitInformation(); | ||||
| if (!$local_info) { | if (!$local_info) { | ||||
| return; | return; | ||||
| } | } | ||||
| $this->updateDiffProperty('local:commits', json_encode($local_info)); | $this->updateDiffProperty('local:commits', json_encode($local_info)); | ||||
| } | } | ||||
| /** | |||||
| * Update generated paths for the diff. | |||||
| * | |||||
| * @task diffprop | |||||
| */ | |||||
| private function updateGeneratedDiffProperty() { | |||||
| $paths = $this->getWorkingCopy()->getProjectConfig('generated-paths'); | |||||
| if ($paths) { | |||||
| $this->updateDiffProperty('arc:generated', json_encode($paths)); | |||||
| } | |||||
| } | |||||
| /** | /** | ||||
| * Update an arbitrary diff property. | * Update an arbitrary diff property. | ||||
| * | * | ||||
| * @param string Diff property name. | * @param string Diff property name. | ||||
| * @param string Diff property value. | * @param string Diff property value. | ||||
| * @return void | * @return void | ||||
| * | * | ||||
| ▲ Show 20 Lines • Show All 272 Lines • Show Last 20 Lines | |||||