From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web12.192.1573080273128668614 for ; Wed, 06 Nov 2019 14:44:33 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 14:44:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,275,1569308400"; d="scan'208";a="402534750" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by fmsmga005.fm.intel.com with ESMTP; 06 Nov 2019 14:44:32 -0800 Received: from orsmsx162.amr.corp.intel.com (10.22.240.85) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 14:44:32 -0800 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.28]) by ORSMSX162.amr.corp.intel.com ([169.254.3.148]) with mapi id 14.03.0439.000; Wed, 6 Nov 2019 14:44:32 -0800 From: "Nate DeSimone" To: "Desimone, Ashley E" , "devel@edk2.groups.io" CC: "Pandya, Puja" Subject: Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 6/8] EdkRepo: Argument Strings Refactor - Sync Command Thread-Topic: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 6/8] EdkRepo: Argument Strings Refactor - Sync Command Thread-Index: AQHVlPMcXk2YY6ZPTUeziPJI0uSOtad+vQTA Date: Wed, 6 Nov 2019 22:44:32 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5BA4897@ORSMSX113.amr.corp.intel.com> References: <20191106223944.18036-1-ashley.e.desimone@intel.com> <20191106223944.18036-6-ashley.e.desimone@intel.com> In-Reply-To: <20191106223944.18036-6-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2M2OGYxNDMtZDJiOC00ZWE3LTlkYTMtNmE5YjdmMzA1NjY2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaEhjTXdjWll1cDQ1XC9PcjFqb3dDa0RIdlZ4UHlSbjJkeFdMTTd5VngrR3lRU2ZiZnlDUVB6eUh0UHJNaGJCR3gifQ== 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 6/8] EdkRepo: Argument= Strings Refactor - Sync Command Move all argument strings for sync_command.py to edkrepo/commands/arguments= /sparse_args.py Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya --- edkrepo/commands/arguments/sync_args.py | 17 +++++++++++++++++ edkrepo/commands/sync_command.py | 13 +++++-------- edkrepo/common/argument_strings.py | 8 -------- 3 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 edk= repo/commands/arguments/sync_args.py diff --git a/edkrepo/commands/arguments/sync_args.py b/edkrepo/commands/arg= uments/sync_args.py new file mode 100644 index 0000000..9961f85 --- /dev/null +++ b/edkrepo/commands/arguments/sync_args.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +# +## @file +# sync_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 sync=20 +command meta data. +''' + +COMMAND_DESCRIPTION =3D 'Updates the local copy of the current combination= \'s target branches by pulling the latest changes from the server. Does not= update local branches.' +FETCH_HELP =3D 'Performs a fetch only sync, no changes will be made to the= local workspace.' +UPDATE_LOCAL_MANIFEST_HELP =3D 'Updates the local copy of the project mani= fest file prior to performing sync operations.' +OVERRIDE_HELP =3D 'Ignore warnings and proceed with sync operations.' \ No newline at end of file diff --git a/edkrepo/commands/sync_command.py b/edkrepo/commands/sync_comma= nd.py index 13f0536..8509bce 100644 --- a/edkrepo/commands/sync_command.py +++ b/edkrepo/commands/sync_command.py @@ -19,11 +19,10 @@ from git import Repo # Our modules from edkrepo.comma= nds.edkrepo_command import EdkrepoCommand from edkrepo.commands.edkrepo_co= mmand import DryRunArgument, SubmoduleSkipArgument +import edkrepo.commands.arguments.sync_args as arguments from edkrepo.common.progress_handler import GitProgressHandler from edkre= po.common.edkrepo_exception import EdkrepoUncommitedChangesException, Edkre= poManifestNotFoundException from edkrepo.common.edkrepo_exception import E= dkrepoManifestChangedException -from edkrepo.common.argument_strings import= SYNC_COMMAND_DESCRIPTION, FETCH_DESCRIPTION, FETCH_HELP, SYNC_OVERRIDE_HEL= P -from edkrepo.common.argument_strings import UPDATE_LOCAL_MANIFEST_HELP, = UPDATE_LOCAL_MANIFEST_DESCRIPTION from edkrepo.common.humble import SYNC_U= NCOMMITED_CHANGES, SYNC_MANIFEST_NOT_FOUND, SYNC_URL_CHANGE, SYNC_COMBO_CHA= NGE from edkrepo.common.humble import SYNC_SOURCE_MOVE_WARNING, SYNC_REMOV= E_WARNING, SYNC_REMOVE_LIST_END_FORMATTING from edkrepo.common.humble impo= rt SYNC_MANIFEST_DIFF_WARNING, SYNC_MANIFEST_UPDATE @@ -54,24 +53,22 @@ cla= ss SyncCommand(EdkrepoCommand): def get_metadata(self): metadata =3D {} metadata['name'] =3D 'sync' - metadata['help-text'] =3D SYNC_COMMAND_DESCRIPTION + metadata['help-text'] =3D arguments.COMMAND_DESCRIPTION args =3D [] metadata['arguments'] =3D args args.append({'name' : 'fetch', 'positional' : False, 'required' : False, - 'description': FETCH_DESCRIPTION, - 'help-text' : FETCH_HELP}) + 'help-text': arguments.FETCH_HELP}) args.append({'name' : 'update-local-manifest', 'short-name': 'u', 'required' : False, - 'description' : UPDATE_LOCAL_MANIFEST_DESCRIPTION, - 'help-text' : UPDATE_LOCAL_MANIFEST_HELP}) + 'help-text' :=20 + arguments.UPDATE_LOCAL_MANIFEST_HELP}) args.append({'name' : 'override', 'short-name': 'o', 'positional' : False, 'required' : False, - 'help-text' : SYNC_OVERRIDE_HELP}) + 'help-text' : arguments.OVERRIDE_HELP}) args.append(SubmoduleSkipArgument) return metadata =20 diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_s= trings.py index 50e25ee..b001441 100644 --- a/edkrepo/common/argument_strings.py +++ b/edkrepo/common/argument_strings.py @@ -33,11 +33,3 @@ SPARSE_HELP =3D 'Enables a sparse checkout based on the = contents of the DSC file(s NO_SPARSE_DESCRIPTION =3D 'Disables sparse chec= kout support.' NO_SPARSE_HELP =3D 'Disables sparse checkout if enabled by default in the = manifest.\n' =20 -#Args for sync_command.py -SYNC_COMMAND_DESCRIPTION =3D 'Updates the local copy of the current combin= ation\'s target branches with the latest changes from the server. Does not = update local branches.' -FETCH_DESCRIPTION =3D 'Downloads the changes from the remote server to the= local workspace with out performing a merge' -FETCH_HELP =3D 'Performs a fetch only sync, no changes will be made to the= local workspace' -UPDATE_LOCAL_MANIFEST_DESCRIPTION =3D 'Updates the global manifest reposit= ory and local manifest file prior to performing a sync' -UPDATE_LOCAL_MANIFEST_HELP =3D 'Updates the local manifest file found in t= he /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.' - -- 2.16.2.windows.1