Differential D19357 Diff 46306 src/applications/diffusion/ssh/DiffusionMercurialServeSSHWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/ssh/DiffusionMercurialServeSSHWorkflow.php
| Show All 39 Lines | if (!$args->getArg('stdio')) { | ||||
| throw new Exception(pht('Expected `%s`!', 'hg ... --stdio')); | throw new Exception(pht('Expected `%s`!', 'hg ... --stdio')); | ||||
| } | } | ||||
| if ($args->getArg('command') !== array('serve')) { | if ($args->getArg('command') !== array('serve')) { | ||||
| throw new Exception(pht('Expected `%s`!', 'hg ... serve')); | throw new Exception(pht('Expected `%s`!', 'hg ... serve')); | ||||
| } | } | ||||
| if ($this->shouldProxy()) { | if ($this->shouldProxy()) { | ||||
| $command = $this->getProxyCommand(); | // NOTE: For now, we're always requesting a writable node. The request | ||||
| // may not actually need one, but we can't currently determine whether | |||||
| // it is read-only or not at this phase of evaluation. | |||||
| $command = $this->getProxyCommand(true); | |||||
| } else { | } else { | ||||
| $command = csprintf( | $command = csprintf( | ||||
| 'hg -R %s serve --stdio', | 'hg -R %s serve --stdio', | ||||
| $repository->getLocalPath()); | $repository->getLocalPath()); | ||||
| } | } | ||||
| $command = PhabricatorDaemon::sudoCommandAsDaemonUser($command); | $command = PhabricatorDaemon::sudoCommandAsDaemonUser($command); | ||||
| $future = id(new ExecFuture('%C', $command)) | $future = id(new ExecFuture('%C', $command)) | ||||
| ▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines | |||||