Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/engine/PhabricatorRepositoryEngine.php
| Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | if ($this->getVerbose()) { | ||||
| array_unshift($argv, "%s\n"); | array_unshift($argv, "%s\n"); | ||||
| call_user_func_array(array($console, 'writeOut'), $argv); | call_user_func_array(array($console, 'writeOut'), $argv); | ||||
| } | } | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| final protected function queueCommitImportTask( | final protected function queueCommitImportTask( | ||||
| PhabricatorRepository $repository, | PhabricatorRepository $repository, | ||||
| $commit_id, | |||||
| $commit_phid, | $commit_phid, | ||||
| $task_priority, | $task_priority, | ||||
| $via = null) { | $via) { | ||||
| $vcs = $repository->getVersionControlSystem(); | $vcs = $repository->getVersionControlSystem(); | ||||
| switch ($vcs) { | switch ($vcs) { | ||||
| case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: | case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT: | ||||
| $class = 'PhabricatorRepositoryGitCommitMessageParserWorker'; | $class = 'PhabricatorRepositoryGitCommitMessageParserWorker'; | ||||
| break; | break; | ||||
| case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: | case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: | ||||
| $class = 'PhabricatorRepositorySvnCommitMessageParserWorker'; | $class = 'PhabricatorRepositorySvnCommitMessageParserWorker'; | ||||
| break; | break; | ||||
| case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: | case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL: | ||||
| $class = 'PhabricatorRepositoryMercurialCommitMessageParserWorker'; | $class = 'PhabricatorRepositoryMercurialCommitMessageParserWorker'; | ||||
| break; | break; | ||||
| default: | default: | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'Unknown repository type "%s"!', | 'Unknown repository type "%s"!', | ||||
| $vcs)); | $vcs)); | ||||
| } | } | ||||
| $data = array( | $data = array( | ||||
| 'commitID' => $commit_id, | 'commitPHID' => $commit_phid, | ||||
| ); | ); | ||||
| if ($via !== null) { | if ($via !== null) { | ||||
| $data['via'] = $via; | $data['via'] = $via; | ||||
| } | } | ||||
| $options = array( | $options = array( | ||||
| 'priority' => $task_priority, | 'priority' => $task_priority, | ||||
| ▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines | |||||