From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web12.191.1573080271895456291 for ; Wed, 06 Nov 2019 14:44:31 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: nathaniel.l.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 fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 14:44:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,276,1569308400"; d="scan'208";a="205482965" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga003.jf.intel.com with ESMTP; 06 Nov 2019 14:44:30 -0800 Received: from orsmsx161.amr.corp.intel.com (10.22.240.84) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 14:44:30 -0800 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.28]) by ORSMSX161.amr.corp.intel.com ([169.254.4.146]) with mapi id 14.03.0439.000; Wed, 6 Nov 2019 14:44:30 -0800 From: "Nate DeSimone" To: "Desimone, Ashley E" , "devel@edk2.groups.io" CC: "Pandya, Puja" Subject: Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 5/8] EdkRepo: Argument Strings Refactor - Sparse Command Thread-Topic: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 5/8] EdkRepo: Argument Strings Refactor - Sparse Command Thread-Index: AQHVlPMdiFqGAwI7/kWH54w+lNtHIad+vQFA Date: Wed, 6 Nov 2019 22:44:29 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5BA488F@ORSMSX113.amr.corp.intel.com> References: <20191106223944.18036-1-ashley.e.desimone@intel.com> <20191106223944.18036-5-ashley.e.desimone@intel.com> In-Reply-To: <20191106223944.18036-5-ashley.e.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWE5N2RmNmItZWQ5Mi00OTVhLTk4ZTktMmQwMDZkMWNhNzBmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWUFWTlp5Ylc0MlA0SWszT2IwMHFzOGFYcXV4MHkxR2MrMEsyekJGVDU5OGRUK0ZxRHpETWpKZzB6QXlnQzBGRiJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Return-Path: nathaniel.l.desimone@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nate DeSimone -----Original Message----- From: Desimone, Ashley E =20 Sent: Wednesday, November 6, 2019 2:40 PM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Pandya, Puja Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 5/8] EdkRepo: Argument= Strings Refactor - Sparse Command Move all argument strings for sparse_command.py to edkrepo/commands/argumen= ts/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 edkr= epo/commands/arguments/sparse_args.py diff --git a/edkrepo/commands/arguments/sparse_args.py b/edkrepo/commands/a= rguments/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.
#=20 +SPDX-License-Identifier: BSD-2-Clause-Patent # + +''' Contains the help and description strings for arguments in the=20 +sparse command meta data. +''' + +COMMAND_DESCRIPTION =3D 'Displays the current sparse checkout status and e= nables changing the sparse checkout state.' +ENABLE_HELP =3D 'Enables sparse checkout if supported in the project manif= est file.' +DISABLE_HELP =3D '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_c= ommand.py index a20bd89..5d4ef90 100644 --- a/edkrepo/commands/sparse_command.py +++ b/edkrepo/commands/sparse_command.py @@ -8,7 +8,7 @@ # =20 from edkrepo.commands.edkrepo_command import EdkrepoCommand -from edkrepo.= common.argument_strings import SPARSE_COMMAND_DESCRIPTION, SPARSE_ENABLE_HE= LP, SPARSE_DISABLE_HELP +import edkrepo.commands.arguments.sparse_args as arguments from edkrepo.config.config_factory import get_workspace_path, get_workspac= e_manifest from edkrepo.common.common_repo_functions import sparse_checkou= t_enabled, sparse_checkout, reset_sparse_checkout from edkrepo.common.comm= on_repo_functions import check_dirty_repos @@ -24,17 +24,17 @@ class Sparse= Command(EdkrepoCommand): def get_metadata(self): metadata =3D {} metadata['name'] =3D 'sparse' - metadata['help-text'] =3D SPARSE_COMMAND_DESCRIPTION + metadata['help-text'] =3D arguments.COMMAND_DESCRIPTION args =3D [] metadata['arguments'] =3D 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 =20 def run_command(self, args, config): diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_s= trings.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 =3D 'Updates the global= manifest repository and UPDATE_LOCAL_MANIFEST_HELP =3D 'Updates the local= manifest file found in the /repo directory prior to performing = sync operations.' SYNC_OVERRIDE_HELP =3D 'Without this flag sync operations will not be comp= leted if the updated manifest adds/removes repositories or if there are loc= al commits on the target branch.' =20 -#Args for sparse_command.py -SPARSE_COMMAND_DESCRIPTION =3D 'Displays the current sparse checkout statu= s and allows for changing the sparse checkout state.' -SPARSE_ENABLE_HELP =3D 'Enables sparse checkout if supported by the manife= st.' -SPARSE_DISABLE_HELP =3D 'Disables sparse checkout if enabled.' -- 2.16.2.windows.1