From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.180.1573080279032818912 for ; Wed, 06 Nov 2019 14:44:39 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 14:44:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,276,1569308400"; d="scan'208";a="201234886" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by fmsmga007.fm.intel.com with ESMTP; 06 Nov 2019 14:44:27 -0800 Received: from orsmsx153.amr.corp.intel.com (10.22.226.247) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 14:44:27 -0800 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.28]) by ORSMSX153.amr.corp.intel.com ([169.254.12.244]) with mapi id 14.03.0439.000; Wed, 6 Nov 2019 14:44:27 -0800 From: "Nate DeSimone" To: "Desimone, Ashley E" , "devel@edk2.groups.io" CC: "Pandya, Puja" Subject: Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 4/8] EdkRepo: Argument String Refactor - Checkout Command Thread-Topic: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 4/8] EdkRepo: Argument String Refactor - Checkout Command Thread-Index: AQHVlPMcclOjwiHYaEKH/TPnzdeUUad+vP2g Date: Wed, 6 Nov 2019 22:44:26 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5BA4886@ORSMSX113.amr.corp.intel.com> References: <20191106223944.18036-1-ashley.e.desimone@intel.com> <20191106223944.18036-4-ashley.e.desimone@intel.com> In-Reply-To: <20191106223944.18036-4-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTRhY2RjZDItYmYwYy00Mjg3LTlhODctMjYyZDc1NDNhNDllIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVmJFR0RBa0haU3luclhaOFo5NlR6cjRoRU9SWEh3TldlUjY3Q1wvajg4XC9RSjVVcExuN0RHaFJ2NjdsT0F0V3JMIn0= 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 4/8] EdkRepo: Argument= String Refactor - Checkout Command Move all argument strings for checkout_command.py to edkrepo/commands/argum= ents/checkout_args.py Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya --- edkrepo/commands/arguments/checkout_args.py | 16 ++++++++++++++++ edkrepo/commands/checkout_command.py | 10 ++++------ edkrepo/common/argument_strings.py | 5 ----- 3 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 edk= repo/commands/arguments/checkout_args.py diff --git a/edkrepo/commands/arguments/checkout_args.py b/edkrepo/commands= /arguments/checkout_args.py new file mode 100644 index 0000000..6c8841e --- /dev/null +++ b/edkrepo/commands/arguments/checkout_args.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 +# +## @file +# checkout_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 +checkout command meta data. +''' + +COMMAND_DESCRIPTION =3D 'Enables checking out a specific branch combinatio= n defined in the project manifest file.' +COMBINATION_DESCRIPTION =3D 'edkrepo checkout ' +COMBINATION_HELP =3D 'The name of the branch combination to checkout as de= fined in the project manifest file.' \ No newline at end of file diff --git a/edkrepo/commands/checkout_command.py b/edkrepo/commands/checko= ut_command.py index fe8ba0b..2ae52be 100644 --- a/edkrepo/commands/checkout_command.py +++ b/edkrepo/commands/checkout_command.py @@ -14,9 +14,7 @@ import os =20 # Our modules from edkrepo.commands.edkrepo_command import EdkrepoCommand, OverrideArgum= ent -from edkrepo.common.argument_strings import CHECKOUT_COMMAND_DESCRIPTI= ON -from edkrepo.common.argument_strings import CHECKOUT_COMBINATION_DESCRI= PTION -from edkrepo.common.argument_strings import CHECKOUT_COMBINATION_HEL= P +import edkrepo.commands.arguments.checkout_args as arguments from edkrepo.common.common_repo_functions import checkout =20 =20 @@ -27,15 +25,15 @@ class CheckoutCommand(EdkrepoCommand): def get_metadata(self): metadata =3D {} metadata['name'] =3D 'checkout' - metadata['help-text'] =3D CHECKOUT_COMMAND_DESCRIPTION + metadata['help-text'] =3D arguments.COMMAND_DESCRIPTION args =3D [] metadata['arguments'] =3D args args.append({'name' : 'Combination', 'positional' : True, 'position' : 0, 'required': True, - 'description' : CHECKOUT_COMBINATION_DESCRIPTION, - 'help-text' : CHECKOUT_COMBINATION_HELP}) + 'description' : arguments.COMBINATION_DESCRIPTION, + 'help-text' : arguments.COMBINATION_HELP}) args.append(OverrideArgument) return metadata =20 diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_s= trings.py index e42d5b1..e5146df 100644 --- a/edkrepo/common/argument_strings.py +++ b/edkrepo/common/argument_strings.py @@ -41,11 +41,6 @@ UPDATE_LOCAL_MANIFEST_DESCRIPTION =3D 'Updates the globa= l manifest repository and UPDATE_LOCAL_MANIFEST_HELP =3D 'Updates the loca= l 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 checkout_command.py -CHECKOUT_COMMAND_DESCRIPTION =3D 'The checkout command enables checking ou= t a specific branch combination from the project manifest located in the /repo directory or the sha of a specific commit which will update = all repos in the workspace to this commit.\nNote that checkout SHA will put= the affected repos into detached head mode.\n' -CHECKOUT_COMBINATION_DESCRIPTION =3D 'EdkRepo checkout \n' -CHECKOUT_COMBINATION_HELP =3D 'Combination: The name of the combination as= defined in the workspace manifest file to checkout or the sha of the revis= ion to checkout\n' - #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.' -- 2.16.2.windows.1