From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com []) by mx.groups.io with SMTP id smtpd.web10.82.1573079991915392445 for ; Wed, 06 Nov 2019 14:39:53 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: ashley.e.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 14:39:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,275,1569308400"; d="scan'208";a="205481884" Received: from aedesimo-desk.amr.corp.intel.com ([10.7.159.171]) by orsmga003.jf.intel.com with ESMTP; 06 Nov 2019 14:39:51 -0800 From: "Desimone, Ashley E" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 5/8] EdkRepo: Argument Strings Refactor - Sparse Command Date: Wed, 6 Nov 2019 14:39:41 -0800 Message-Id: <20191106223944.18036-5-ashley.e.desimone@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20191106223944.18036-1-ashley.e.desimone@intel.com> References: <20191106223944.18036-1-ashley.e.desimone@intel.com> Move all argument strings for sparse_command.py to edkrepo/commands/arguments/sparse_args.py Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya --- edkrepo/commands/arguments/sparse_args.py | 16 ++++++++++++++++ edkrepo/commands/sparse_command.py | 8 ++++---- edkrepo/common/argument_strings.py | 4 ---- 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 edkrepo/commands/arguments/sparse_args.py diff --git a/edkrepo/commands/arguments/sparse_args.py b/edkrepo/commands/arguments/sparse_args.py new file mode 100644 index 0000000..167334c --- /dev/null +++ b/edkrepo/commands/arguments/sparse_args.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 +# +## @file +# sparse_args.py +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +''' Contains the help and description strings for arguments in the +sparse command meta data. +''' + +COMMAND_DESCRIPTION = 'Displays the current sparse checkout status and enables changing the sparse checkout state.' +ENABLE_HELP = 'Enables sparse checkout if supported in the project manifest file.' +DISABLE_HELP = 'Disables sparse checkout if it is currently enabled.' \ No newline at end of file diff --git a/edkrepo/commands/sparse_command.py b/edkrepo/commands/sparse_command.py index a20bd89..5d4ef90 100644 --- a/edkrepo/commands/sparse_command.py +++ b/edkrepo/commands/sparse_command.py @@ -8,7 +8,7 @@ # from edkrepo.commands.edkrepo_command import EdkrepoCommand -from edkrepo.common.argument_strings import SPARSE_COMMAND_DESCRIPTION, SPARSE_ENABLE_HELP, SPARSE_DISABLE_HELP +import edkrepo.commands.arguments.sparse_args as arguments from edkrepo.config.config_factory import get_workspace_path, get_workspace_manifest from edkrepo.common.common_repo_functions import sparse_checkout_enabled, sparse_checkout, reset_sparse_checkout from edkrepo.common.common_repo_functions import check_dirty_repos @@ -24,17 +24,17 @@ class SparseCommand(EdkrepoCommand): def get_metadata(self): metadata = {} metadata['name'] = 'sparse' - metadata['help-text'] = SPARSE_COMMAND_DESCRIPTION + metadata['help-text'] = arguments.COMMAND_DESCRIPTION args = [] metadata['arguments'] = args args.append({'name': 'enable', 'positional': False, 'required': False, - 'help-text': SPARSE_ENABLE_HELP}) + 'help-text': arguments.ENABLE_HELP}) args.append({'name': 'disable', 'positional': False, 'required': False, - 'help-text': SPARSE_DISABLE_HELP}) + 'help-text': arguments.DISABLE_HELP}) return metadata def run_command(self, args, config): diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py index e5146df..50e25ee 100644 --- a/edkrepo/common/argument_strings.py +++ b/edkrepo/common/argument_strings.py @@ -41,7 +41,3 @@ UPDATE_LOCAL_MANIFEST_DESCRIPTION = 'Updates the global manifest repository and UPDATE_LOCAL_MANIFEST_HELP = 'Updates the local manifest file found in the /repo directory prior to performing sync operations.' SYNC_OVERRIDE_HELP = 'Without this flag sync operations will not be completed if the updated manifest adds/removes repositories or if there are local commits on the target branch.' -#Args for sparse_command.py -SPARSE_COMMAND_DESCRIPTION = 'Displays the current sparse checkout status and allows for changing the sparse checkout state.' -SPARSE_ENABLE_HELP = 'Enables sparse checkout if supported by the manifest.' -SPARSE_DISABLE_HELP = 'Disables sparse checkout if enabled.' -- 2.16.2.windows.1