Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistDiffWorkflow.php
| Show First 20 Lines • Show All 2,523 Lines • ▼ Show 20 Lines | /* -( Diff Properties )---------------------------------------------------- */ | ||||
| private function checkRevisionOwnership(array $revision) { | private function checkRevisionOwnership(array $revision) { | ||||
| if ($revision['authorPHID'] == $this->getUserPHID()) { | if ($revision['authorPHID'] == $this->getUserPHID()) { | ||||
| return; | return; | ||||
| } | } | ||||
| $id = $revision['id']; | $id = $revision['id']; | ||||
| $title = $revision['title']; | $title = $revision['title']; | ||||
| throw new ArcanistUsageException( | $prompt = pht( | ||||
| pht( | "You don't own revision %s: \"%s\". Normally, you should ". | ||||
| "You don't own revision %s '%s'. You can only update revisions ". | "only update revisions you own. You can \"Commandeer\" this revision ". | ||||
| "you own. You can 'Commandeer' this revision from the web ". | "from the web interface if you want to become the owner.\n\n". | ||||
| "interface if you want to become the owner.", | "Update this revision anyway? [y/N]", | ||||
| "D{$id}", | "D{$id}", | ||||
| $title)); | $title); | ||||
| $ok = phutil_console_confirm($prompt, $default_no = true); | |||||
| if (!$ok) { | |||||
| throw new ArcanistUsageException( | |||||
| pht('Aborted update of revision: You are not the owner.')); | |||||
| } | |||||
| } | } | ||||
| /* -( File Uploads )------------------------------------------------------- */ | /* -( File Uploads )------------------------------------------------------- */ | ||||
| private function uploadFilesForChanges(array $changes) { | private function uploadFilesForChanges(array $changes) { | ||||
| assert_instances_of($changes, 'ArcanistDiffChange'); | assert_instances_of($changes, 'ArcanistDiffChange'); | ||||
| ▲ Show 20 Lines • Show All 361 Lines • Show Last 20 Lines | |||||