mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-01 19:22:41 +01:00
Remove "arc diff --only"
Summary: Experimental branch. Depends on D18738. Ref T2543. To prepare for adding `--draft`, clean up some of the flags behaviors. `--only` currently means `--preview --nolint --nounit`. I'm going to: - Remove `--only`. - Rename `--preview` to `--only`, since I think `--only` is a better flag for this behavior than `--preview`. - If you want the old `--only`, you can `arc alias` it to `arc diff --only --nolint --nounit --browse` or similar. Test Plan: Grepped for `'only'`, `only`, etc. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T2543 Differential Revision: https://secure.phabricator.com/D18739
This commit is contained in:
parent
ccd648b4c4
commit
4c4f2e6674
1 changed files with 3 additions and 31 deletions
|
@ -113,7 +113,6 @@ EOTEXT
|
||||||
'param' => 'commit',
|
'param' => 'commit',
|
||||||
'help' => pht('Read revision information from a specific commit.'),
|
'help' => pht('Read revision information from a specific commit.'),
|
||||||
'conflicts' => array(
|
'conflicts' => array(
|
||||||
'only' => null,
|
|
||||||
'preview' => null,
|
'preview' => null,
|
||||||
'update' => null,
|
'update' => null,
|
||||||
),
|
),
|
||||||
|
@ -176,10 +175,6 @@ EOTEXT
|
||||||
'%s can not be used with %s.',
|
'%s can not be used with %s.',
|
||||||
'--create',
|
'--create',
|
||||||
'--edit'),
|
'--edit'),
|
||||||
'only' => pht(
|
|
||||||
'%s can not be used with %s.',
|
|
||||||
'--create',
|
|
||||||
'--only'),
|
|
||||||
'preview' => pht(
|
'preview' => pht(
|
||||||
'%s can not be used with %s.',
|
'%s can not be used with %s.',
|
||||||
'--create',
|
'--create',
|
||||||
|
@ -206,29 +201,12 @@ EOTEXT
|
||||||
'never-apply-patches' => pht('%s suppresses lint.', '--nolint'),
|
'never-apply-patches' => pht('%s suppresses lint.', '--nolint'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'only' => array(
|
|
||||||
'help' => pht(
|
|
||||||
'Only generate a diff, without running lint, unit tests, or other '.
|
|
||||||
'auxiliary steps. See also %s.',
|
|
||||||
'--preview'),
|
|
||||||
'conflicts' => array(
|
|
||||||
'preview' => null,
|
|
||||||
'message' => pht('%s does not affect revisions.', '--only'),
|
|
||||||
'edit' => pht('%s does not affect revisions.', '--only'),
|
|
||||||
'lintall' => pht('%s suppresses lint.', '--only'),
|
|
||||||
'advice' => pht('%s suppresses lint.', '--only'),
|
|
||||||
'apply-patches' => pht('%s suppresses lint.', '--only'),
|
|
||||||
'never-apply-patches' => pht('%s suppresses lint.', '--only'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'preview' => array(
|
'preview' => array(
|
||||||
'help' => pht(
|
'help' => pht(
|
||||||
'Instead of creating or updating a revision, only create a diff, '.
|
'Instead of creating or updating a revision, only create a diff, '.
|
||||||
'which you may later attach to a revision. This still runs lint '.
|
'which you may later attach to a revision. This still runs lint '.
|
||||||
'unit tests. See also %s.',
|
'unit tests.'),
|
||||||
'--only'),
|
|
||||||
'conflicts' => array(
|
'conflicts' => array(
|
||||||
'only' => null,
|
|
||||||
'edit' => pht('%s does affect revisions.', '--preview'),
|
'edit' => pht('%s does affect revisions.', '--preview'),
|
||||||
'message' => pht('%s does not update any revision.', '--preview'),
|
'message' => pht('%s does not update any revision.', '--preview'),
|
||||||
),
|
),
|
||||||
|
@ -343,7 +321,6 @@ EOTEXT
|
||||||
'conflicts' => array(
|
'conflicts' => array(
|
||||||
'use-commit-message' => true,
|
'use-commit-message' => true,
|
||||||
'update' => true,
|
'update' => true,
|
||||||
'only' => true,
|
|
||||||
'preview' => true,
|
'preview' => true,
|
||||||
'raw' => true,
|
'raw' => true,
|
||||||
'raw-command' => true,
|
'raw-command' => true,
|
||||||
|
@ -354,7 +331,6 @@ EOTEXT
|
||||||
'param' => 'usernames',
|
'param' => 'usernames',
|
||||||
'help' => pht('When creating a revision, add reviewers.'),
|
'help' => pht('When creating a revision, add reviewers.'),
|
||||||
'conflicts' => array(
|
'conflicts' => array(
|
||||||
'only' => true,
|
|
||||||
'preview' => true,
|
'preview' => true,
|
||||||
'update' => true,
|
'update' => true,
|
||||||
),
|
),
|
||||||
|
@ -363,7 +339,6 @@ EOTEXT
|
||||||
'param' => 'usernames',
|
'param' => 'usernames',
|
||||||
'help' => pht('When creating a revision, add CCs.'),
|
'help' => pht('When creating a revision, add CCs.'),
|
||||||
'conflicts' => array(
|
'conflicts' => array(
|
||||||
'only' => true,
|
|
||||||
'preview' => true,
|
'preview' => true,
|
||||||
'update' => true,
|
'update' => true,
|
||||||
),
|
),
|
||||||
|
@ -762,8 +737,7 @@ EOTEXT
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->getArgument('preview') ||
|
return $this->getArgument('preview');
|
||||||
$this->getArgument('only');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function generateAffectedPaths() {
|
private function generateAffectedPaths() {
|
||||||
|
@ -1200,7 +1174,6 @@ EOTEXT
|
||||||
*/
|
*/
|
||||||
private function runLint() {
|
private function runLint() {
|
||||||
if ($this->getArgument('nolint') ||
|
if ($this->getArgument('nolint') ||
|
||||||
$this->getArgument('only') ||
|
|
||||||
$this->isRawDiffSource() ||
|
$this->isRawDiffSource() ||
|
||||||
$this->getArgument('head')) {
|
$this->getArgument('head')) {
|
||||||
return ArcanistLintWorkflow::RESULT_SKIP;
|
return ArcanistLintWorkflow::RESULT_SKIP;
|
||||||
|
@ -1281,7 +1254,6 @@ EOTEXT
|
||||||
*/
|
*/
|
||||||
private function runUnit() {
|
private function runUnit() {
|
||||||
if ($this->getArgument('nounit') ||
|
if ($this->getArgument('nounit') ||
|
||||||
$this->getArgument('only') ||
|
|
||||||
$this->isRawDiffSource() ||
|
$this->isRawDiffSource() ||
|
||||||
$this->getArgument('head')) {
|
$this->getArgument('head')) {
|
||||||
return ArcanistUnitWorkflow::RESULT_SKIP;
|
return ArcanistUnitWorkflow::RESULT_SKIP;
|
||||||
|
@ -1425,7 +1397,7 @@ EOTEXT
|
||||||
* @task message
|
* @task message
|
||||||
*/
|
*/
|
||||||
private function buildCommitMessage() {
|
private function buildCommitMessage() {
|
||||||
if ($this->getArgument('preview') || $this->getArgument('only')) {
|
if ($this->getArgument('preview')) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue