3 final class DiffusionSubversionCommandEngine
4 extends DiffusionCommandEngine
{
6 protected function canBuildForRepository(
7 PhabricatorRepository
$repository) {
8 return $repository->isSVN();
11 protected function newFormattedCommand($pattern, array $argv) {
15 $flags[] = '--non-interactive';
17 if ($this->isAnyHTTPProtocol() ||
$this->isSVNProtocol()) {
18 $flags[] = '--no-auth-cache';
20 if ($this->isAnyHTTPProtocol()) {
21 $flags[] = '--trust-server-cert';
24 $credential_phid = $this->getCredentialPHID();
25 if ($credential_phid) {
26 $key = PassphrasePasswordKey
::loadFromPHID(
28 PhabricatorUser
::getOmnipotentUser());
30 $flags[] = '--username %P';
31 $args[] = $key->getUsernameEnvelope();
33 $flags[] = '--password %P';
34 $args[] = $key->getPasswordEnvelope();
38 $flags = implode(' ', $flags);
39 $pattern = "svn {$flags} {$pattern}";
41 return array($pattern, array_merge($args, $argv));
44 protected function newCustomEnvironment() {
47 $env['SVN_SSH'] = $this->getSSHWrapper();