From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com []) by mx.groups.io with SMTP id smtpd.web12.191.1573080271895456291 for ; Wed, 06 Nov 2019 14:44:35 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , 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:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,276,1569308400"; d="scan'208";a="205482979" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga003.jf.intel.com with ESMTP; 06 Nov 2019 14:44:35 -0800 Received: from orsmsx123.amr.corp.intel.com (10.22.240.116) 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:35 -0800 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.28]) by ORSMSX123.amr.corp.intel.com ([169.254.1.174]) with mapi id 14.03.0439.000; Wed, 6 Nov 2019 14:44:34 -0800 From: "Nate DeSimone" To: "Desimone, Ashley E" , "devel@edk2.groups.io" CC: "Pandya, Puja" Subject: Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 7/8] EdkRepo: Argument Strings Refactor - Clone Command Thread-Topic: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 7/8] EdkRepo: Argument Strings Refactor - Clone Command Thread-Index: AQHVlPMdnS7Md8BVj0yMUGiTwjsviKd+vQhg Date: Wed, 6 Nov 2019 22:44:34 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5BA48A7@ORSMSX113.amr.corp.intel.com> References: <20191106223944.18036-1-ashley.e.desimone@intel.com> <20191106223944.18036-7-ashley.e.desimone@intel.com> In-Reply-To: <20191106223944.18036-7-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTNlMWE1NTItMDNhMy00OGUwLWJkZDAtMWI5ZWVjMGQ3YTRkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVlNqUGtFY3ppZ2tzdFp5dFVKMXVWZmdiS2h4K1BvWHJqR09VQ3JKS3pRVVZUeUZ3UkxhVVplYnpEaE9jTUZhZCJ9 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 7/8] EdkRepo: Argument= Strings Refactor - Clone Command Move all argument strings for clone_command.py to edkrepo/commands/argument= s/clone_args.py Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya --- edkrepo/commands/arguments/clone_args.py | 22 ++++++++++++++++++++++ edkrepo/commands/clone_command.py | 24 +++++++----------------- edkrepo/common/argument_strings.py | 14 -------------- 3 files changed, 29 insertions(+), 31 deletions(-) create mode 100644 edk= repo/commands/arguments/clone_args.py diff --git a/edkrepo/commands/arguments/clone_args.py b/edkrepo/commands/ar= guments/clone_args.py new file mode 100644 index 0000000..b143adc --- /dev/null +++ b/edkrepo/commands/arguments/clone_args.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +# +## @file +# clone_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 +clone command meta data. +''' + +COMMAND_DESCRIPTION =3D 'Downloads a project and creates a new workspace.' +WORKSPACE_HELP =3D ('The destination for the newly created workspace, this= must be an empty directory.\n' + 'A value of "." indicates the current working=20 +directory.') PROJECT_MANIFEST_HELP =3D ('Either a project name as listed b= y "edkrepo manifest" or the path to a project manifest file.\n' + 'If a relative path is provided clone will first = search relative to the current working directory' + ' and then search relative to the global=20 +manifest repository.') COMBINATION_HELP =3D 'The name of the combination t= o checkout. If not specified the projects default combination is used.' +SPARSE_HELP =3D 'Enables sparse checkout if supported by the project manif= est file.' +NO_SPARSE_HELP =3D 'Disables sparse checkout if the project manifest file = enables it by default.' \ No newline at end of file diff --git a/edkrepo/commands/clone_command.py b/edkrepo/commands/clone_com= mand.py index e74c4e4..2400272 100644 --- a/edkrepo/commands/clone_command.py +++ b/edkrepo/commands/clone_command.py @@ -10,14 +10,9 @@ import os import shutil =20 - -# Our modules from edkrepo.commands.edkrepo_command import EdkrepoCommand from edkrepo.= commands.edkrepo_command import SubmoduleSkipArgument -from edkrepo.common.= argument_strings import PROJECT_OR_MANIFEST_DESCRIPTION, PROJECT_OR_MANIFES= T_HELP -from edkrepo.common.argument_strings import COMBINATION_DESCRIPTION= , COMBINATION_HELP, WORKSPACE_DESCRIPTION -from edkrepo.common.argument_str= ings import WORKSPACE_HELP, CLONE_COMMAND_DESCRIPTION -from edkrepo.common.= argument_strings import SPARSE_HELP, SPARSE_DESCRIPTION, NO_SPARSE_DESCRIPT= ION, NO_SPARSE_HELP +import edkrepo.commands.arguments.clone_args as arguments from edkrepo.common.common_repo_functions import pull_latest_manifest_repo= , clone_repos, sparse_checkout, verify_manifest_data from edkrepo.common.c= ommon_repo_functions import case_insensitive_single_match, update_editor_co= nfig from edkrepo.common.common_repo_functions import write_included_confi= g, write_conditional_include @@ -35,37 +30,32 @@ class CloneCommand(Edkrepo= Command): def get_metadata(self): metadata =3D {} metadata['name'] =3D 'clone' - metadata['help-text'] =3D CLONE_COMMAND_DESCRIPTION + metadata['help-text'] =3D arguments.COMMAND_DESCRIPTION args =3D [] metadata['arguments'] =3D args args.append({'name': 'Workspace', 'positional': True, 'position': 0, 'required': True, - 'description': WORKSPACE_DESCRIPTION, - 'help-text': WORKSPACE_HELP}) + 'help-text': arguments.WORKSPACE_HELP}) args.append({'name': 'ProjectNameOrManifestFile', 'positional': True, 'position': 1, 'required': True, - 'description': PROJECT_OR_MANIFEST_DESCRIPTION, - 'help-text': PROJECT_OR_MANIFEST_HELP}) + 'help-text': arguments.PROJECT_MANIFEST_HELP}) args.append({'name': 'Combination', 'positional': True, 'position': 2, 'required': False, - 'description': COMBINATION_DESCRIPTION, - 'help-text': COMBINATION_HELP}) + 'help-text': arguments.COMBINATION_HELP}) args.append({'name': 'sparse', 'positional': False, 'required': False, - 'description': SPARSE_DESCRIPTION, - 'help-text': SPARSE_HELP}) + 'help-text': arguments.SPARSE_HELP}) args.append({'name': 'nosparse', 'positional': False, 'required': False, - 'description': NO_SPARSE_DESCRIPTION, - 'help-text': NO_SPARSE_HELP}) + 'help-text': arguments.NO_SPARSE_HELP}) args.append(SubmoduleSkipArgument) return metadata =20 diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_s= trings.py index b001441..75e13ee 100644 --- a/edkrepo/common/argument_strings.py +++ b/edkrepo/common/argument_strings.py @@ -18,18 +18,4 @@ OVERRIDE_HELP =3D 'Ignore warnings' SUBMODULE_SKIP_HELP =3D 'Skip the pull or sync of any submodules.' COLOR_HELP =3D 'Force color output (useful with \'less -r\')' =20 -#Args for clone_command.py -CLONE_COMMAND_DESCRIPTION =3D 'Downloads a project and creates a new works= pace' -WORKSPACE_DESCRIPTION =3D 'The workspace in which to clone.' -WORKSPACE_HELP =3D 'The workspace in which to clone. This must refer to an= empty directory. A value of "." indicates the current working directory \n= ' -PROJECT_OR_MANIFEST_DESCRIPTION =3D 'The project name as listed in the CiI= ndex.xml file or the name of the manifest file' -PROJECT_OR_MANIFEST_HELP =3D ('The project name as listed in the CiIndex.x= ml file or a path to a manifest file. If a relative path to a manifest file= is provided ' + - 'clone will attempt to find it by first search= ing relative to the current working directory and then searchting relative = to the ' + - 'global manifest repository \n') -COMBINATION_DESCRIPTION =3D 'The combination to checkout' -COMBINATION_HELP =3D 'The combination name to checkout if not specified th= e default combination is used.\n' -SPARSE_DESCRIPTION =3D 'Enables sparse checkout support.' -SPARSE_HELP =3D 'Enables a sparse checkout based on the contents of the DS= C file(s) listed by the manifest.\n' -NO_SPARSE_DESCRIPTION =3D 'Disables sparse checkout support.' -NO_SPARSE_HELP =3D 'Disables sparse checkout if enabled by default in the = manifest.\n' =20 -- 2.16.2.windows.1