Differential D11543 Diff 27797 src/applications/diffusion/ssh/DiffusionSubversionServeSSHWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/ssh/DiffusionSubversionServeSSHWorkflow.php
| Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | final class DiffusionSubversionServeSSHWorkflow | ||||
| protected function executeRepositoryOperations() { | protected function executeRepositoryOperations() { | ||||
| $repository = $this->getRepository(); | $repository = $this->getRepository(); | ||||
| $args = $this->getArgs(); | $args = $this->getArgs(); | ||||
| if (!$args->getArg('tunnel')) { | if (!$args->getArg('tunnel')) { | ||||
| throw new Exception('Expected `svnserve -t`!'); | throw new Exception('Expected `svnserve -t`!'); | ||||
| } | } | ||||
| if ($this->shouldProxy()) { | |||||
| $command = $this->getProxyCommand(); | |||||
| } else { | |||||
| $command = csprintf( | $command = csprintf( | ||||
| 'svnserve -t --tunnel-user=%s', | 'svnserve -t --tunnel-user=%s', | ||||
| $this->getUser()->getUsername()); | $this->getUser()->getUsername()); | ||||
| $command = PhabricatorDaemon::sudoCommandAsDaemonUser($command); | } | ||||
| $command = PhabricatorDaemon::sudoCommandAsDaemonUser($command); | |||||
| $future = new ExecFuture('%C', $command); | $future = new ExecFuture('%C', $command); | ||||
| $this->inProtocol = new DiffusionSubversionWireProtocol(); | $this->inProtocol = new DiffusionSubversionWireProtocol(); | ||||
| $this->outProtocol = new DiffusionSubversionWireProtocol(); | $this->outProtocol = new DiffusionSubversionWireProtocol(); | ||||
| $this->command = id($this->newPassthruCommand()) | $this->command = id($this->newPassthruCommand()) | ||||
| ->setIOChannel($this->getIOChannel()) | ->setIOChannel($this->getIOChannel()) | ||||
| ->setCommandChannelFromExecFuture($future) | ->setCommandChannelFromExecFuture($future) | ||||
| ▲ Show 20 Lines • Show All 265 Lines • Show Last 20 Lines | |||||