From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web10.4620.1589502177998122701 for ; Thu, 14 May 2020 17:22:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=hzC34/Y3; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: 7AwVX23+MZK403x7MlfdxuizWVpYO29wjrDJqXwGI+wYeA3xUSqaB0P19Q5loHexmvgrlS/3i4 OfK0cJ3KP4NQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2020 17:22:57 -0700 IronPort-SDR: VGu9Q8Vf2kDzTQuoGR4Ms1KUwE8KYOUBQ2+ZwmXRSgcszDevr3TTkvM243zSMlTBQ+uXN07fBy V3xgdVJWJqLQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,392,1583222400"; d="scan'208";a="298223783" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 14 May 2020 17:22:57 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 14 May 2020 17:22:56 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 14 May 2020 17:22:56 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 14 May 2020 17:22:56 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 14 May 2020 17:22:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e25KWtzjm2jNq6V2C8kW00NoFuJgUyHjFbG+FHbvGPbJA8lc9s8LsYoG+AFVs7r6zIvZoOFxvJENyJbfR27VGVwdkjtE+f0DKd9G827jJBgddciCqtSM3vMSIAjp11MJ735/cWz+T5vDcAM83qsT+XYSk47gr/tSEOSTaVEyajsIb5S2ckSDqN3PujLu1Nuulfy/gaqqnFSH570zz/g0WNjw4/iwBcY22tzuSM8KB/GAVGdPunGx8UgWHvbRgTB4cmdXuprIhtk013ITjNembvkq87CpiwB6ydA33i2+wlhLkSKOyk+/4TbBk7YKbKYp8ykaNYh036r6sPBlgOmLcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1pRbkC3AU7ofk6aSSqu28B9Nen5GcynfFEae4jWijsY=; b=IY7wQiMl8uvLpCyQcqghrnGV2qXvvROdVMjrqNePn+J4HCoXqSxAyZtHZNiuFG8HhpIsQZHuuZx2oZQu+uYQZAmHP+Xjagm4WzmdHZtjVk45r+N8uWfEVxCV7bcR4JhEJWnFmKMSqdTEMnUeV2Z8JdjFN+xrVKHLBUc1bydYQ3BFntn3FfzFuTegg8GOdWq2uqSdpNQgqtHd9pHufCquEwaULzHA3GecDQIxk8hFhPA0KeInQDYo29A54zyssu3z2c2WbeJmrud0L+X+BZC1Jg454ePriXF9BB2sWY3Q+iX6d1SFrYl1kYSG03PWj4+emO/NftPqaKM9vhtMFOhavA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1pRbkC3AU7ofk6aSSqu28B9Nen5GcynfFEae4jWijsY=; b=hzC34/Y3aKQoejwsytbe8VsSr5kZGC0hFIcFf6dYD7iYC6jd0yGZGMpa+wsdrfol1Tp4yrM+UHshB4/gfHIDoiK9kJjRp2ahBiSyyVIMSpvHVE11VN/Og/pD/au44lITrGTCRNytNmvtZJsyi/8V0gw2a/YbprvOCALZybcBS3Q= Received: from BL0PR11MB3489.namprd11.prod.outlook.com (2603:10b6:208:75::29) by BL0PR11MB3076.namprd11.prod.outlook.com (2603:10b6:208:33::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.25; Fri, 15 May 2020 00:22:53 +0000 Received: from BL0PR11MB3489.namprd11.prod.outlook.com ([fe80::d0f8:bfd7:bae2:3e42]) by BL0PR11MB3489.namprd11.prod.outlook.com ([fe80::d0f8:bfd7:bae2:3e42%7]) with mapi id 15.20.2979.033; Fri, 15 May 2020 00:22:53 +0000 From: "Nate DeSimone" To: "Desimone, Ashley E" , "devel@edk2.groups.io" CC: "Pandya, Puja" , "Bjorge, Erik C" , Bret Barkelew , "Agyeman, Prince" Subject: Re: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Only process the checkout command if a valid combo is used Thread-Topic: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Only process the checkout command if a valid combo is used Thread-Index: AQHWKXaaE4veejhoy02rLpImER+sB6ioSHJQ Date: Fri, 15 May 2020 00:22:52 +0000 Message-ID: References: <20200513223320.19904-1-ashley.e.desimone@intel.com> In-Reply-To: <20200513223320.19904-1-ashley.e.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2YyM2Y5NjMtNDI3ZC00OWQ3LThlOTYtMzk3NDkxOTZjNWQ4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRjRHYXVBUnN2elZFdElcL09CcW55a0czMDVORWlwMlZSbkZaUUMwV0d2WGZSQjB3U1NJUlA0TU1YN2VxOWhFOEEifQ== dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-ctpclassification: CTP_NT authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [50.53.190.176] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d8441343-ad5c-4f9f-2136-08d7f8661bab x-ms-traffictypediagnostic: BL0PR11MB3076: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 04041A2886 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +kHhQ9Je1qDrsmy45dknTDNEaUbqi/wxQlePKmBw5brnlGKdzFDgCbW65CIJFAJblVgc7z0f7yqNAuXh1qraohmo5TBIZ0AGYXz0NWBxA4pdLmDi9HyO0aNeWLK+rj2+Vsnh8XZanPn95roOjQ8PFQlqMNXuyUTZLTaBsPXukn73ixu9D8/ZNOh219ciJliVHBi0NOk84P3WGJrY967y5lx43eOM4SKqnLBV3WqxLSg7rFBArYLeUNAVm7I1gwkHJjPIMyM6Slf2BZmTecjJx0Q1DkVzS54iaT0MLKpS9yls8nIFqRpY7ecn8hqxejaoFRu+aM125OKWkenhc1M+n/NKKmFVqXlyQuVtEKCm1NIvTZoslTMdUvSe9GmXK3qNLy0muzc9cz9uk+sU9XB9NLpvJcl58wwLeKFUPVKATDkSgGvXlRPOea7rQedmALRB x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR11MB3489.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(396003)(39860400002)(346002)(136003)(366004)(376002)(6506007)(53546011)(86362001)(7696005)(8936002)(5660300002)(71200400001)(52536014)(186003)(26005)(107886003)(55016002)(478600001)(33656002)(8676002)(316002)(2906002)(4326008)(9686003)(54906003)(66946007)(66556008)(66446008)(110136005)(76116006)(64756008)(66476007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: g3IMEx9MlWvTfPLUFWHSO47dz2gjJBsQCdLW9AU+/gr2nYu2kfmcpi47ygtAPBo3e8yq56G8pzaxKBVVjjwWpwbbMOnZyx5g/dss3jZ9WjVZg/8QTAO2/VJXtnwvmXSJAsfZrm6UgcBeE7Rf+lY51/kEk26CTHwtE+AF11zCZvGNsvVOauiIWo3k600f6KJpW2F56GvHM5lVqpdPEUKWV49PN8hUSUNYXaL5fcmOO0LRgw+q0uEU8/zZcRZgRwHY0E0vdzpNUYZK5NC7/DU2Cvn6BedeLC1nuWA4h53US+S+Q/8pkI/SvU75en2T5U6sJf2odtfwhKvqG5p+WTwblKJth+tbZLliQrhjNw4+63XFrlp2XRlfSCIZbHnqwiXY6UNURtk17h5nr7B0RovSVMDUpO37lP8LYxSRUb7QeYEw0u4TXhQJmRIYui0DwKMOoN/ffXxN5XbxaP1dXnyIzUqSy5flmZMyyC7iUVqUdRs+a+qI1LTcwo+CYr89HeeW MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: d8441343-ad5c-4f9f-2136-08d7f8661bab X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2020 00:22:52.8878 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ihP0nRThktjfq0xTqNTYOHW5KpYAyoMjH99GECkH5aIDPEYx/s6NujUvO05G42UgiYY3V7Qd6NGaE+mqYe+GeI1ddfyAX1PsYDIdn9GfvXI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3076 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ashley, Please update the copyright year on checkout_command.py Also, please see additional comments inline. Thanks, Nate > -----Original Message----- > From: Desimone, Ashley E > Sent: Wednesday, May 13, 2020 3:33 PM > To: devel@edk2.groups.io > Cc: Desimone, Nathaniel L ; Pandya, Puja > ; Bjorge, Erik C ; Bret > Barkelew ; Agyeman, Prince > > Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Only process the > checkout command if a valid combo is used >=20 > Signed-off-by: Ashley E Desimone > Cc: Nate DeSimone > Cc: Puja Pandya > Cc: Erik Bjorge > Cc: Bret Barkelew > Cc: Prince Agyeman > --- > edkrepo/commands/checkout_command.py | 18 ++++++++++++------ > edkrepo/commands/humble/checkout_humble.py | 17 +++++++++++++++++ > 2 files changed, 29 insertions(+), 6 deletions(-) > create mode 100644 edkrepo/commands/humble/checkout_humble.py >=20 > diff --git a/edkrepo/commands/checkout_command.py b/edkrepo/commands/chec= kout_command.py > index 7d65eb8..bc8a080 100644 > --- a/edkrepo/commands/checkout_command.py > +++ b/edkrepo/commands/checkout_command.py > @@ -14,8 +14,11 @@ import os > =20 > # Our modules > from edkrepo.commands.edkrepo_command import EdkrepoCommand, OverrideArg= ument > -import edkrepo.commands.arguments.checkout_args as arguments > -from edkrepo.common.common_repo_functions import checkout > +import edkrepo.commands.arguments.checkout_args as arguments > +import edkrepo.command.humble.checkout_humble as humble This is incorrect, it should be: import edkrepo.commands.humble.checkout_hu= mble as humble > +from edkrepo.common.common_repo_functions import checkout, combination_i= s_in_manifest > +from edkrepo.common.edkrepo_exception import EdkrepoInvalidParametersExc= eption > +from edkrepo.config.config_factory import get_workspace_manifest > =20 > =20 > class CheckoutCommand(EdkrepoCommand): > @@ -25,17 +28,20 @@ class CheckoutCommand(EdkrepoCommand): > def get_metadata(self): > metadata =3D {} > metadata['name'] =3D 'checkout' > - metadata['help-text'] =3D arguments.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' : arguments.COMBINATION_DESCRIPTION, > - 'help-text' : arguments.COMBINATION_HELP}) > + 'description' : arguments.COMBINATION_DESCRIPTION, > + 'help-text' : arguments.COMBINATION_HELP}) > args.append(OverrideArgument) > return metadata > =20 > def run_command(self, args, config): > - checkout(args.Combination, args.verbose, args.override) > + if combination_is_in_manifest(args.Combination, get_workspace_ma= nifest()): > + checkout(args.Combination, args.verbose, args.override) > + else: > + raise EdkrepoInvalidParametersException(humble.NO_COMBO) NO_COMBO is not defined in checkout_humble.py > diff --git a/edkrepo/commands/humble/checkout_humble.py b/edkrepo/command= s/humble/checkout_humble.py > new file mode 100644 > index 0000000..ec0ffc1 > --- /dev/null > +++ b/edkrepo/commands/humble/checkout_humble.py > @@ -0,0 +1,17 @@ > +#!/usr/bin/env python3 > +# > +## @file > +# checkout_humble.py > +# > +# Copyright (c) 2020, Intel Corporation. All rights reserved.
> +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > + > +CHP_EXIT =3D 'Exiting without checkout out PIN data.' > +NOT_FOUND =3D 'The selected PIN file was not found.' > +MANIFEST_MISMATCH =3D ('The selected PIN file does not refer to the same= project ' > + 'as the local manifest file. {}'.format(CHP_EXIT)) > +COMMIT_NOT_FOUND =3D 'The commit referenced by the PIN file does not exi= st. {}'.format(CHP_EXIT) > +PIN_COMBO =3D 'Pin: {}' > +COMBO_NOT_FOUND =3D ('Warning: The combo listed in PIN file: {} is no lo= nger ' > + 'listed in the project manifest file.') > --=20 > 2.16.2.windows.1