mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 19:32:40 +01:00
2f44c0fac9
Summary: Ref T2784. This is a lower-level one from drequest so it gets the conditional initialization treatment. Consolidated SVN as well even though SVN is issuing database queries; I felt better about the code de-duplication despite the small performance hit when we could just query the DB directly in the SVN case. Test Plan: browsed around my Phabricator repositories in Mercurial, Git, and SVN flavors. Looked good. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2784 Differential Revision: https://secure.phabricator.com/D5956
33 lines
575 B
PHP
33 lines
575 B
PHP
<?php
|
|
|
|
/**
|
|
* @group diffusion
|
|
*/
|
|
final class DiffusionSvnRequest extends DiffusionRequest {
|
|
|
|
protected function getSupportsBranches() {
|
|
return false;
|
|
}
|
|
|
|
protected function didInitialize() {
|
|
if ($this->path === null) {
|
|
$subpath = $this->repository->getDetail('svn-subpath');
|
|
if ($subpath) {
|
|
$this->path = $subpath;
|
|
}
|
|
}
|
|
}
|
|
|
|
protected function getArcanistBranch() {
|
|
return 'svn';
|
|
}
|
|
|
|
public function getCommit() {
|
|
if ($this->commit) {
|
|
return $this->commit;
|
|
}
|
|
|
|
return $this->getStableCommitName();
|
|
}
|
|
|
|
}
|