Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionServeController.php
Show First 20 Lines • Show All 763 Lines • ▼ Show 20 Lines | private function serveMercurialRequest( | ||||
$args = $this->getMercurialArguments(); | $args = $this->getMercurialArguments(); | ||||
$args = $this->formatMercurialArguments($cmd, $args); | $args = $this->formatMercurialArguments($cmd, $args); | ||||
if (strlen($input)) { | if (strlen($input)) { | ||||
$input = strlen($input)."\n".$input."0\n"; | $input = strlen($input)."\n".$input."0\n"; | ||||
} | } | ||||
$command = csprintf( | $command = csprintf( | ||||
'%s serve -R %s --stdio', | '%s -R %s serve --stdio', | ||||
$bin, | $bin, | ||||
$repository->getLocalPath()); | $repository->getLocalPath()); | ||||
$command = PhabricatorDaemon::sudoCommandAsDaemonUser($command); | $command = PhabricatorDaemon::sudoCommandAsDaemonUser($command); | ||||
list($err, $stdout, $stderr) = id(new ExecFuture('%C', $command)) | list($err, $stdout, $stderr) = id(new ExecFuture('%C', $command)) | ||||
->setEnv($env, true) | ->setEnv($env, true) | ||||
->setCWD($repository->getLocalPath()) | ->setCWD($repository->getLocalPath()) | ||||
->write("{$cmd}\n{$args}{$input}") | ->write("{$cmd}\n{$args}{$input}") | ||||
▲ Show 20 Lines • Show All 456 Lines • Show Last 20 Lines |