mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 00:32:41 +01:00
Make arc diff --background 1
default and disable it on Windows
Summary: I am using it for about a month. It works even in Facebook www. Test Plan: $ arc diff --background 1 # hundreds of times Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3495
This commit is contained in:
parent
baa64a5c83
commit
e1b2d787c9
1 changed files with 12 additions and 4 deletions
|
@ -92,7 +92,7 @@ EOTEXT
|
|||
}
|
||||
|
||||
public function getArguments() {
|
||||
return array(
|
||||
$arguments = array(
|
||||
'message' => array(
|
||||
'short' => 'm',
|
||||
'param' => 'message',
|
||||
|
@ -349,10 +349,16 @@ EOTEXT
|
|||
'param' => 'bool',
|
||||
'help' =>
|
||||
'Run lint and unit tests on background. '.
|
||||
'"0" to disable (default), "1" to enable.',
|
||||
'"0" to disable, "1" to enable (default).',
|
||||
),
|
||||
'*' => 'paths',
|
||||
);
|
||||
|
||||
if (phutil_is_windows()) {
|
||||
unset($arguments['background']);
|
||||
}
|
||||
|
||||
return $arguments;
|
||||
}
|
||||
|
||||
public function isRawDiffSource() {
|
||||
|
@ -371,7 +377,9 @@ EOTEXT
|
|||
|
||||
$this->runDiffSetupBasics();
|
||||
|
||||
if ($this->getArgument('background')) {
|
||||
$background = $this->getArgument('background', !phutil_is_windows());
|
||||
|
||||
if ($background) {
|
||||
$argv = $_SERVER['argv'];
|
||||
// Insert after `arc diff`.
|
||||
array_splice($argv, 2, 0, array('--recon', '--no-diff'));
|
||||
|
@ -394,7 +402,7 @@ EOTEXT
|
|||
$revision = $this->buildRevisionFromCommitMessage($commit_message);
|
||||
}
|
||||
|
||||
if ($this->getArgument('background')) {
|
||||
if ($background) {
|
||||
$server = new PhutilConsoleServer();
|
||||
$server->addExecFutureClient($lint_unit);
|
||||
$server->run();
|
||||
|
|
Loading…
Reference in a new issue