Differential D11543 Diff 27797 src/applications/diffusion/ssh/DiffusionMercurialServeSSHWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/ssh/DiffusionMercurialServeSSHWorkflow.php
| Show All 36 Lines | protected function executeRepositoryOperations() { | ||||
| if (!$args->getArg('stdio')) { | if (!$args->getArg('stdio')) { | ||||
| throw new Exception('Expected `hg ... --stdio`!'); | throw new Exception('Expected `hg ... --stdio`!'); | ||||
| } | } | ||||
| if ($args->getArg('command') !== array('serve')) { | if ($args->getArg('command') !== array('serve')) { | ||||
| throw new Exception('Expected `hg ... serve`!'); | throw new Exception('Expected `hg ... serve`!'); | ||||
| } | } | ||||
| $command = csprintf('hg -R %s serve --stdio', $repository->getLocalPath()); | if ($this->shouldProxy()) { | ||||
| $command = $this->getProxyCommand(); | |||||
| } else { | |||||
| $command = csprintf( | |||||
| 'hg -R %s serve --stdio', | |||||
| $repository->getLocalPath()); | |||||
| } | |||||
| $command = PhabricatorDaemon::sudoCommandAsDaemonUser($command); | $command = PhabricatorDaemon::sudoCommandAsDaemonUser($command); | ||||
| $future = id(new ExecFuture('%C', $command)) | $future = id(new ExecFuture('%C', $command)) | ||||
| ->setEnv($this->getEnvironment()); | ->setEnv($this->getEnvironment()); | ||||
| $io_channel = $this->getIOChannel(); | $io_channel = $this->getIOChannel(); | ||||
| $protocol_channel = new DiffusionMercurialWireClientSSHProtocolChannel( | $protocol_channel = new DiffusionMercurialWireClientSSHProtocolChannel( | ||||
| $io_channel); | $io_channel); | ||||
| ▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines | |||||