Page MenuHomePhabricator

D7959.id18006.diff
No OneTemporary

D7959.id18006.diff

Index: src/workflow/ArcanistBaseWorkflow.php
===================================================================
--- src/workflow/ArcanistBaseWorkflow.php
+++ src/workflow/ArcanistBaseWorkflow.php
@@ -239,7 +239,7 @@
* @return this
* @task conduit
*/
- public function forceConduitVersion($version) {
+ final public function forceConduitVersion($version) {
$this->forcedConduitVersion = $version;
return $this;
}
@@ -251,7 +251,7 @@
* @return int Version the client should claim to be.
* @task conduit
*/
- public function getConduitVersion() {
+ final public function getConduitVersion() {
return nonempty($this->forcedConduitVersion, 6);
}
@@ -265,7 +265,7 @@
* @return this
* @task conduit
*/
- public function setConduitTimeout($timeout) {
+ final public function setConduitTimeout($timeout) {
$this->conduitTimeout = $timeout;
if ($this->conduit) {
$this->conduit->setConduitTimeout($timeout);
@@ -490,25 +490,25 @@
}
- public function setArcanistConfiguration(
+ final public function setArcanistConfiguration(
ArcanistConfiguration $arcanist_configuration) {
$this->arcanistConfiguration = $arcanist_configuration;
return $this;
}
- public function getArcanistConfiguration() {
+ final public function getArcanistConfiguration() {
return $this->arcanistConfiguration;
}
- public function setConfigurationManager(
+ final public function setConfigurationManager(
ArcanistConfigurationManager $arcanist_configuration_manager) {
$this->configurationManager = $arcanist_configuration_manager;
return $this;
}
- public function getConfigurationManager() {
+ final public function getConfigurationManager() {
return $this->configurationManager;
}
@@ -528,12 +528,12 @@
return false;
}
- public function setCommand($command) {
+ final public function setCommand($command) {
$this->command = $command;
return $this;
}
- public function getCommand() {
+ final public function getCommand() {
return $this->command;
}
@@ -541,25 +541,25 @@
return array();
}
- public function setWorkingDirectory($working_directory) {
+ final public function setWorkingDirectory($working_directory) {
$this->workingDirectory = $working_directory;
return $this;
}
- public function getWorkingDirectory() {
+ final public function getWorkingDirectory() {
return $this->workingDirectory;
}
- private function setParentWorkflow($parent_workflow) {
+ final private function setParentWorkflow($parent_workflow) {
$this->parentWorkflow = $parent_workflow;
return $this;
}
- protected function getParentWorkflow() {
+ final protected function getParentWorkflow() {
return $this->parentWorkflow;
}
- public function buildChildWorkflow($command, array $argv) {
+ final public function buildChildWorkflow($command, array $argv) {
$arc_config = $this->getArcanistConfiguration();
$workflow = $arc_config->buildWorkflow($command);
$workflow->setParentWorkflow($this);
@@ -590,11 +590,11 @@
return $workflow;
}
- public function getArgument($key, $default = null) {
+ final public function getArgument($key, $default = null) {
return idx($this->arguments, $key, $default);
}
- public function getPassedArguments() {
+ final public function getPassedArguments() {
return $this->passedArguments;
}
@@ -606,7 +606,7 @@
return $spec;
}
- public function parseArguments(array $args) {
+ final public function parseArguments(array $args) {
$this->passedArguments = $args;
$spec = $this->getCompleteArgumentSpecification();
@@ -731,7 +731,7 @@
// Override this to customize workflow argument behavior.
}
- public function getWorkingCopy() {
+ final public function getWorkingCopy() {
$working_copy = $this->getConfigurationManager()->getWorkingCopyIdentity();
if (!$working_copy) {
$workflow = get_class($this);
@@ -742,18 +742,18 @@
return $working_copy;
}
- public function setWorkingCopy(
+ final public function setWorkingCopy(
ArcanistWorkingCopyIdentity $working_copy) {
$this->workingCopy = $working_copy;
return $this;
}
- public function setRepositoryAPI($api) {
+ final public function setRepositoryAPI($api) {
$this->repositoryAPI = $api;
return $this;
}
- public function getRepositoryAPI() {
+ final public function getRepositoryAPI() {
if (!$this->repositoryAPI) {
$workflow = get_class($this);
throw new Exception(
@@ -763,16 +763,16 @@
return $this->repositoryAPI;
}
- protected function shouldRequireCleanUntrackedFiles() {
+ final protected function shouldRequireCleanUntrackedFiles() {
return empty($this->arguments['allow-untracked']);
}
- public function setCommitMode($mode) {
+ final public function setCommitMode($mode) {
$this->commitMode = $mode;
return $this;
}
- public function finalizeWorkingCopy() {
+ final public function finalizeWorkingCopy() {
if ($this->stashed) {
$api = $this->getRepositoryAPI();
$api->unstashChanges();
@@ -780,7 +780,7 @@
}
}
- public function requireCleanWorkingCopy() {
+ final public function requireCleanWorkingCopy() {
$api = $this->getRepositoryAPI();
$must_commit = array();
@@ -993,7 +993,7 @@
return phutil_console_confirm($prompt);
}
- protected function loadDiffBundleFromConduit(
+ final protected function loadDiffBundleFromConduit(
ConduitClient $conduit,
$diff_id) {
@@ -1004,7 +1004,7 @@
));
}
- protected function loadRevisionBundleFromConduit(
+ final protected function loadRevisionBundleFromConduit(
ConduitClient $conduit,
$revision_id) {
@@ -1015,7 +1015,7 @@
));
}
- private function loadBundleFromConduit(
+ final private function loadBundleFromConduit(
ConduitClient $conduit,
$params) {
@@ -1048,7 +1048,7 @@
* @return list|null List of changed line numbers, or null to indicate that
* the path is not a line-oriented text file.
*/
- protected function getChangedLines($path, $mode) {
+ final protected function getChangedLines($path, $mode) {
$repository_api = $this->getRepositoryAPI();
$full_path = $repository_api->getPath($path);
if (is_dir($full_path)) {
@@ -1069,7 +1069,7 @@
return array_keys($lines);
}
- protected function getChange($path) {
+ final protected function getChange($path) {
$repository_api = $this->getRepositoryAPI();
// TODO: Very gross
@@ -1139,7 +1139,7 @@
}
}
- protected function normalizeRevisionID($revision_id) {
+ final protected function normalizeRevisionID($revision_id) {
return preg_replace('/^D/i', '', $revision_id);
}
@@ -1155,7 +1155,7 @@
return array('any');
}
- protected function getPassthruArgumentsAsMap($command) {
+ final protected function getPassthruArgumentsAsMap($command) {
$map = array();
foreach ($this->getCompleteArgumentSpecification() as $key => $spec) {
if (!empty($spec['passthru'][$command])) {
@@ -1167,7 +1167,7 @@
return $map;
}
- protected function getPassthruArgumentsAsArgv($command) {
+ final protected function getPassthruArgumentsAsArgv($command) {
$spec = $this->getCompleteArgumentSpecification();
$map = $this->getPassthruArgumentsAsMap($command);
$argv = array();
@@ -1187,11 +1187,11 @@
* @param string Message to write to stderr.
* @return void
*/
- protected function writeStatusMessage($msg) {
+ final protected function writeStatusMessage($msg) {
fwrite(STDERR, $msg);
}
- protected function isHistoryImmutable() {
+ final protected function isHistoryImmutable() {
$repository_api = $this->getRepositoryAPI();
$config = $this->getConfigFromAnySource('history.immutable');
@@ -1218,7 +1218,7 @@
* Defaults to ArcanistRepositoryAPI::FLAG_UNTRACKED.
* @return list List of paths the workflow should act on.
*/
- protected function selectPathsForWorkflow(
+ final protected function selectPathsForWorkflow(
array $paths,
$rev,
$omit_mask = null) {
@@ -1258,7 +1258,7 @@
return array_values($paths);
}
- protected function renderRevisionList(array $revisions) {
+ final protected function renderRevisionList(array $revisions) {
$list = array();
foreach ($revisions as $revision) {
$list[] = ' - D'.$revision['id'].': '.$revision['title']."\n";
@@ -1277,7 +1277,7 @@
* @return mixed String for file contents, or false for failure.
* @task scratch
*/
- protected function readScratchFile($path) {
+ final protected function readScratchFile($path) {
if (!$this->repositoryAPI) {
return false;
}
@@ -1292,7 +1292,7 @@
* @return array Empty array for failure.
* @task scratch
*/
- protected function readScratchJSONFile($path) {
+ final protected function readScratchJSONFile($path) {
$file = $this->readScratchFile($path);
if (!$file) {
return array();
@@ -1310,7 +1310,7 @@
* @return bool True on success, false on failure.
* @task scratch
*/
- protected function writeScratchFile($path, $data) {
+ final protected function writeScratchFile($path, $data) {
if (!$this->repositoryAPI) {
return false;
}
@@ -1327,7 +1327,7 @@
* @return bool True on success, false on failure.
* @task scratch
*/
- protected function writeScratchJSONFile($path, array $data) {
+ final protected function writeScratchJSONFile($path, array $data) {
return $this->writeScratchFile($path, json_encode($data));
}
@@ -1339,7 +1339,7 @@
* @return bool True if the file was removed successfully.
* @task scratch
*/
- protected function removeScratchFile($path) {
+ final protected function removeScratchFile($path) {
if (!$this->repositoryAPI) {
return false;
}
@@ -1354,7 +1354,7 @@
* @return mixed String, or false on failure.
* @task scratch
*/
- protected function getReadableScratchFilePath($path) {
+ final protected function getReadableScratchFilePath($path) {
if (!$this->repositoryAPI) {
return false;
}
@@ -1369,19 +1369,19 @@
* @return mixed File path, or false on failure.
* @task scratch
*/
- protected function getScratchFilePath($path) {
+ final protected function getScratchFilePath($path) {
if (!$this->repositoryAPI) {
return false;
}
return $this->getRepositoryAPI()->getScratchFilePath($path);
}
- protected function getRepositoryEncoding() {
+ final protected function getRepositoryEncoding() {
$default = 'UTF-8';
return nonempty(idx($this->getProjectInfo(), 'encoding'), $default);
}
- protected function getProjectInfo() {
+ final protected function getProjectInfo() {
if ($this->projectInfo === null) {
$project_id = $this->getWorkingCopy()->getProjectID();
if (!$project_id) {
@@ -1411,7 +1411,7 @@
return $this->projectInfo;
}
- protected function loadProjectRepository() {
+ final protected function loadProjectRepository() {
$project = $this->getProjectInfo();
if (isset($project['repository'])) {
return $project['repository'];
@@ -1431,7 +1431,7 @@
return idx($repositories, $repository_phid, array());
}
- protected function newInteractiveEditor($text) {
+ final protected function newInteractiveEditor($text) {
$editor = new PhutilInteractiveEditor($text);
$preferred = $this->getConfigFromAnySource('editor');
@@ -1442,7 +1442,7 @@
return $editor;
}
- protected function newDiffParser() {
+ final protected function newDiffParser() {
$parser = new ArcanistDiffParser();
if ($this->repositoryAPI) {
$parser->setRepositoryAPI($this->getRepositoryAPI());
@@ -1451,7 +1451,7 @@
return $parser;
}
- protected function resolveCall(ConduitFuture $method, $timeout = null) {
+ final protected function resolveCall(ConduitFuture $method, $timeout = null) {
try {
return $method->resolve($timeout);
} catch (ConduitClientException $ex) {
@@ -1466,7 +1466,7 @@
}
}
- protected function dispatchEvent($type, array $data) {
+ final protected function dispatchEvent($type, array $data) {
$data += array(
'workflow' => $this,
);
@@ -1477,7 +1477,7 @@
return $event;
}
- public function parseBaseCommitArgument(array $argv) {
+ final public function parseBaseCommitArgument(array $argv) {
if (!count($argv)) {
return;
}
@@ -1499,7 +1499,7 @@
return $this;
}
- protected function getRepositoryVersion() {
+ final protected function getRepositoryVersion() {
if (!$this->repositoryVersion) {
$api = $this->getRepositoryAPI();
$commit = $api->getSourceControlBaseRevision();

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 20, 9:50 PM (1 d, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7240160
Default Alt Text
D7959.id18006.diff (12 KB)

Event Timeline