Differential D15420 Diff 37180 src/applications/drydock/view/DrydockRepositoryOperationStatusView.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/drydock/view/DrydockRepositoryOperationStatusView.php
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | if ($state != DrydockRepositoryOperation::STATE_FAIL) { | ||||
$vcs_error = $operation->getCommandError(); | $vcs_error = $operation->getCommandError(); | ||||
if ($vcs_error) { | if ($vcs_error) { | ||||
switch ($vcs_error['phase']) { | switch ($vcs_error['phase']) { | ||||
case DrydockWorkingCopyBlueprintImplementation::PHASE_SQUASHMERGE: | case DrydockWorkingCopyBlueprintImplementation::PHASE_SQUASHMERGE: | ||||
$message = pht( | $message = pht( | ||||
'This change did not merge cleanly. This usually indicates '. | 'This change did not merge cleanly. This usually indicates '. | ||||
'that the change is out of date and needs to be updated.'); | 'that the change is out of date and needs to be updated.'); | ||||
break; | break; | ||||
case DrydockWorkingCopyBlueprintImplementation::PHASE_REMOTEFETCH: | |||||
$message = pht( | |||||
'This change could not be fetched from the remote.'); | |||||
break; | |||||
case DrydockWorkingCopyBlueprintImplementation::PHASE_MERGEFETCH: | |||||
$message = pht( | |||||
'This change could not be fetched from the remote staging '. | |||||
'area. It may not have been pushed, or may have been removed.'); | |||||
break; | |||||
case DrydockLandRepositoryOperation::PHASE_COMMIT: | |||||
$message = pht( | |||||
'Committing this change failed. It may already have been '. | |||||
'merged.'); | |||||
break; | |||||
case DrydockLandRepositoryOperation::PHASE_PUSH: | case DrydockLandRepositoryOperation::PHASE_PUSH: | ||||
$message = pht( | $message = pht( | ||||
'The push failed. This usually indicates '. | 'The push failed. This usually indicates '. | ||||
'that the change is breaking some rules or '. | 'that the change is breaking some rules or '. | ||||
'some custom commit hook has failed.'); | 'some custom commit hook has failed.'); | ||||
break; | break; | ||||
default: | default: | ||||
$message = pht( | $message = pht( | ||||
Show All 25 Lines | public function renderUnderwayState() { | ||||
} | } | ||||
return id(new PHUIObjectItemListView()) | return id(new PHUIObjectItemListView()) | ||||
->addItem($item); | ->addItem($item); | ||||
} | } | ||||
private function renderVCSErrorTable(array $vcs_error) { | private function renderVCSErrorTable(array $vcs_error) { | ||||
$rows = array(); | $rows = array(); | ||||
$rows[] = array(pht('Command'), $vcs_error['command']); | |||||
$rows[] = array( | |||||
pht('Command'), | |||||
phutil_censor_credentials($vcs_error['command']), | |||||
); | |||||
$rows[] = array(pht('Error'), $vcs_error['err']); | $rows[] = array(pht('Error'), $vcs_error['err']); | ||||
$rows[] = array(pht('Stdout'), $vcs_error['stdout']); | |||||
$rows[] = array(pht('Stderr'), $vcs_error['stderr']); | $rows[] = array( | ||||
pht('Stdout'), | |||||
phutil_censor_credentials($vcs_error['stdout']), | |||||
); | |||||
$rows[] = array( | |||||
pht('Stderr'), | |||||
phutil_censor_credentials($vcs_error['stderr']), | |||||
); | |||||
$table = id(new AphrontTableView($rows)) | $table = id(new AphrontTableView($rows)) | ||||
->setColumnClasses( | ->setColumnClasses( | ||||
array( | array( | ||||
'header', | 'header', | ||||
'wide prewrap', | 'wide prewrap', | ||||
)); | )); | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |