Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
1.2 kB · 52 lines
PHP
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253<?php
final class DiffusionSubversionCommandEngine extends DiffusionCommandEngine {
protected function canBuildForRepository( PhabricatorRepository $repository) { return $repository->isSVN(); }
protected function newFormattedCommand($pattern, array $argv) { $flags = array(); $args = array();
$flags[] = '--non-interactive';
if ($this->isAnyHTTPProtocol() || $this->isSVNProtocol()) { $flags[] = '--no-auth-cache';
if ($this->isAnyHTTPProtocol()) { $flags[] = '--trust-server-cert'; }
$credential_phid = $this->getCredentialPHID(); if ($credential_phid) { $key = PassphrasePasswordKey::loadFromPHID( $credential_phid, PhabricatorUser::getOmnipotentUser());
$flags[] = '--username %P'; $args[] = $key->getUsernameEnvelope();
$flags[] = '--password %P'; $args[] = $key->getPasswordEnvelope(); } }
$flags = implode(' ', $flags); $pattern = "svn {$flags} {$pattern}";
return array($pattern, array_merge($args, $argv)); }
protected function newCustomEnvironment() { $env = array();
$env['SVN_SSH'] = $this->getSSHWrapper();
return $env; }
}