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.web11.9896.1589082698782980404 for ; Sat, 09 May 2020 20:51:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=j5m7fYXP; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: yuTEM/j9k7fmQmgcM3FNDviQD/9DHlSncbQxO8nKm0NI6PWystin2wEaitudK6oaDhmTX3TVri NERpsZoFYSeQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2020 20:51:38 -0700 IronPort-SDR: 2LTMU4N2hRYjzT7jmBCTagCswwZm0c9APWz2VA33gDzLGZaiaEdpxfd26zRkJZRRmQd6TYsWFZ P3aeofWSWdQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,374,1583222400"; d="scan'208";a="264800047" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga006.jf.intel.com with ESMTP; 09 May 2020 20:51:38 -0700 Received: from orsmsx121.amr.corp.intel.com (10.22.225.226) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 20:51:37 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX121.amr.corp.intel.com (10.22.225.226) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 20:51:37 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.105) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 20:51:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R91gd+td9gE935GALh8Ba+9aGCjWfAAN2ebrsnRozbj45fZ9O5+YjSKOPWO21ypwkHImEOPbh4pPliAG0syJTKS2IKn7wVhSeT645Y3bauPRl8YkiUdSG3dIg4n/5RvRTovg8WArSJAxYwmxoQwRkrKra9JBV6GcPymKHYdB/l1ewOXRygqL4gPnGYzyLcXUYcwU9Q+4gErFDDkUBbL1uOgR7t/yjeyyEvi2L7YkjucTLqMh01rismTnddnNRJm96MRrcxbWL2A5n1HiMK8Cz1QAHA0AclplspkG9D+id9LGj5gZP1yH3VTpCRpVhNLfYMF2O5kjHN7TTOuAxwZjRw== 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=nhfpIiY3uCvwJXNOvUG6UCy9PvuVwaivN4ktc8HQaQg=; b=C4X5LJ2i3j4g+1F8GuSv4zDsNJVimc5/TbzChnoBTy3+AvvuDkM3Iq0dTLdwQMJ6Cfks5lBO4sHj2MbqUSLXaFxzh04pUdnwpNvTkHbcxaSR+ARRFvckfUr0E6RP+X0K2SvJ1yTf0Yo57LQ453qm1aJ2Zx/yC7RowGVJUirXsH1brpRFhqKFuOn2jFZgUegFwWu4mFMfPk+N2+KGn3G/U4apdK8je3ehmzWdOqhGfArx1P+GCfibg/tJawwuNZ3+5250s6rS+H8jVHW6yuFB1GYYtsWfvV2GOIhUFBhMeQGLZGJ39rBhw22p1GG2SUt8iCCeBMpnYm3TAEoeG6/AJw== 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=nhfpIiY3uCvwJXNOvUG6UCy9PvuVwaivN4ktc8HQaQg=; b=j5m7fYXPmLEyXSQdlqlt8D9g44JwYKPR7WO+HfPcPfElK3Rpx/1GOxFVw/Nxv5r4DZZpvSrhTI0wq5KchKmK4/VQ9FhJ0RpHqhPeDcvruZBbNYo7thMFD8ZqDyCzfEiCAr7GNRxm63Y1l3n3J5KLHtdXaQJ/qDxNcly6q+TvPTI= Received: from BL0PR11MB3489.namprd11.prod.outlook.com (2603:10b6:208:75::29) by BL0PR11MB2946.namprd11.prod.outlook.com (2603:10b6:208:78::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.29; Sun, 10 May 2020 03:51:35 +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; Sun, 10 May 2020 03:51:35 +0000 From: "Nate DeSimone" To: "devel@edk2.groups.io" , "Desimone, Ashley E" CC: "Pandya, Puja" , "Bjorge, Erik C" , Bret Barkelew , "Agyeman, Prince" Subject: Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH V3] EdkRepo: Update Create-Pin to be support multiple manifest repositories Thread-Topic: [edk2-devel] [edk2-staging/EdkRepo] [PATCH V3] EdkRepo: Update Create-Pin to be support multiple manifest repositories Thread-Index: AQHWJno2HC2G6qkiJUOzFC5MOnnsQ6igr5Bg Date: Sun, 10 May 2020 03:51:35 +0000 Message-ID: References: <20200510032150.17144-1-ashley.e.desimone@intel.com> In-Reply-To: <20200510032150.17144-1-ashley.e.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmExMzc3MTQtYmZmNS00ZDE5LTkwYjYtNTc5ODdmYmI5NmEyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQkpsVElIV3RPRmQxSGxER0JObzcxQWUxMjNQb05EM0ZLNUJONHhGTEFBWWEyWjVcL2ZrUzd3MWJORFdncjRxUkcifQ== dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-ctpclassification: CTP_NT authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; 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: d288c67b-2d4b-4bae-0b39-08d7f4956f82 x-ms-traffictypediagnostic: BL0PR11MB2946: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:549; x-forefront-prvs: 039975700A x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0U6PQihK3MJyLuPjGSSUd+n5V7ujHWhcvnCnavS2BSh0BVptstEC+TF7+BbaMzlCD2kDQHooNWxEjKTjeQpo+TYvDd4Q9qyqqjODfQFVCfTZNKHnLeAlzahvY1WWEoq+KVWaJyl8uI33cUG1jp8a5CcAB5kesQ3XN496oKJkUBtoAvdtOtmvc4XPUD5mult6SF2/FQ3dCDRl14s8Nk3FF/qEYcn+KUcLrgDqNA2LuK7trYDw/A5tdpnrrFOCLIBS7sSEgnmH+9wrcNMHRPMHBX/rW4178RprhvtQn5L9pQseS6LtsnigD+W6pwEA+oY+W1wJvpGWkdHn49SxH54iVKwjMxj0/ZZQyWgKmTgQdRtj1AJSyo+leYnqAUbL9CyQon0XRwdyqQ6uz9fHNlpDPZpzX8E0zX4ggPXmMVOmygUNV01CLufyhkkiMDT4Ew3DJmxmFi7z24ywm+fXBO6+kM2A7JlpWn1GwgR7kAKGF59CQGY6SYAbpj79XALDNppDyZMY738yscJ8jFCJ3kwuCkMTD5c8CIVXvR+F/x/Mqk2wKMadwz76PGe3A3HrMrgxqhxXqrCng9FpAFfLpUGlrbcHgX6UIfpekpYv8ByYMig= 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:(39860400002)(346002)(136003)(366004)(376002)(396003)(33430700001)(71200400001)(86362001)(76116006)(54906003)(8936002)(2906002)(6636002)(15650500001)(9686003)(66946007)(52536014)(110136005)(316002)(66446008)(6506007)(66476007)(26005)(5660300002)(8676002)(966005)(7696005)(478600001)(107886003)(33440700001)(4326008)(64756008)(53546011)(66556008)(33656002)(186003)(55016002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: F1gaGTVRMY11JDD8cM/T5YqWV4c8Iu7P8Z2kCVnkchGLLid2M1xUafQ0tpG2s4LFOgVGHwSEtT1MUGApthK4UIYLd8BfnQZk4C4e/+Pmm47RulDg+9KJfLyAUp0ljqLVzxP1PzHocZn9RW67/D3H9LQF0lIjSJvBYF1AH+psJ5Kxmqx4pulsHk5ZuqDSdnpSSExNOCqZh9NDVEwktpYobr6FHB5olt0vGjW6PI4uYT/aimu3EbZYYMcGBziND0Cnlq8+M47dsdWGp57m2fPcTEZB8Xl4reTMjupBtwhbcEyU9TmRKOx2LTFExcFDSp3WyNAfnhRXsf4kBrxZaoTzVISlP6Xd5kVAAohaD7v/Yf6u5n30TZYVtB13DLypY80FHNCbe5mTj8Y4aVvx6LsWIoBcTy2OoJqR6zbgNZskgxlZysUQBfONWM091WfazlUt4s/RsQXscS/MMEdxNYaVdvyzuctNepd1fp5emDkd9+E= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: d288c67b-2d4b-4bae-0b39-08d7f4956f82 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2020 03:51:35.2733 (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: d80/E7P5oJDTjK9v3VB9EM+TWvtpSO769n2jfhyMsgJRAfXwE03m78oxV4FwI7Ye8eLmziTiQI0o9rPcstTi78h8Vzfnv0ZpUytY1sj9vec= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB2946 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 Pushed: 706536b63ba06bfb6a2b3a5800ff6cc53bd11e84 > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ashley E > Desimone > Sent: Saturday, May 9, 2020 8:22 PM > To: devel@edk2.groups.io > Cc: Desimone, Nathaniel L ; Pandya, Puja > ; Bjorge, Erik C ; Bret > Barkelew ; Agyeman, Prince > > Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH V3] EdkRepo: Update > Create-Pin to be support multiple manifest repositories >=20 > Update the create pin command to select and interact with only the > workspaces source manifest repository. >=20 > Signed-off-by: Ashley E Desimone > Cc: Nate DeSimone > Cc: Puja Pandya > Cc: Erik Bjorge > Cc: Bret Barkelew > Cc: Prince Agyeman > --- > edkrepo/commands/create_pin_command.py | 22 ++++++++++++++++---- > -- > 1 file changed, 16 insertions(+), 6 deletions(-) >=20 > diff --git a/edkrepo/commands/create_pin_command.py > b/edkrepo/commands/create_pin_command.py > index f8618e5..24180ba 100644 > --- a/edkrepo/commands/create_pin_command.py > +++ b/edkrepo/commands/create_pin_command.py > @@ -12,14 +12,16 @@ from collections import namedtuple >=20 > from git import Repo >=20 > -from edkrepo.commands.edkrepo_command import EdkrepoCommand > +from edkrepo.commands.edkrepo_command import EdkrepoCommand, > +SourceManifestRepoArgument > import edkrepo.commands.arguments.create_pin_args as arguments -from > edkrepo.common.common_repo_functions import > pull_latest_manifest_repo from edkrepo.common.edkrepo_exception > import EdkrepoManifestInvalidException, > EdkrepoInvalidParametersException from > edkrepo.common.edkrepo_exception import > EdkrepoWorkspaceCorruptException from edkrepo.common.humble import > WRITING_PIN_FILE, GENERATING_PIN_DATA, GENERATING_REPO_DATA, > BRANCH, COMMIT from edkrepo.common.humble import > COMMIT_MESSAGE, PIN_PATH_NOT_PRESENT, PIN_FILE_ALREADY_EXISTS, > PATH_AND_FILEPATH_USED from edkrepo.common.humble import > MISSING_REPO > +from > edkrepo.common.workspace_maintenance.manifest_repos_maintenance > +import find_source_manifest_repo from > +edkrepo.common.workspace_maintenance.manifest_repos_maintenance > import > +list_available_manifest_repos from > +edkrepo.common.workspace_maintenance.manifest_repos_maintenance > import > +pull_workspace_manifest_repo > from edkrepo.config.config_factory import get_workspace_manifest, > get_workspace_path from edkrepo_manifest_parser.edk_manifest import > ManifestXml >=20 > @@ -49,6 +51,7 @@ class CreatePinCommand(EdkrepoCommand): > 'positional': False, > 'required': False, > 'help-text': arguments.PUSH_HELP}) > + args.append(SourceManifestRepoArgument) > return metadata >=20 > def run_command(self, args, config): > @@ -56,14 +59,21 @@ class CreatePinCommand(EdkrepoCommand): > if args.push and os.path.dirname(args.PinFileName): > raise > EdkrepoInvalidParametersException(PATH_AND_FILEPATH_USED) >=20 > - pull_latest_manifest_repo(args, config) > workspace_path =3D get_workspace_path() > manifest =3D get_workspace_manifest() >=20 > + if args.push: > + src_manifest_repo =3D find_source_manifest_repo(manifest, > config['cfg_file'], config['user_cfg_file'], args.source_manifest_repo) > + pull_workspace_manifest_repo(manifest, config['cfg_file'], > config['user_cfg_file'], args.source_manifest_repo, False) > + cfg, user_cfg, conflicts =3D > list_available_manifest_repos(config['cfg_file'], config['user_cfg_file'= ]) > + if src_manifest_repo in cfg: > + manifest_repo_path =3D > config['cfg_file'].manifest_repo_abs_path(src_manifest_repo) > + elif src_manifest_repo in user_cfg: > + manifest_repo_path =3D > + config['user_cfg_file'].manifest_repo_abs_path(src_manifest_repo) > # If the push flag is enabled use general_config.pin_path to de= termine > global manifest relative location to save > # pin file to. > if args.push and manifest.general_config.pin_path is not None: > - pin_dir =3D > os.path.join(config['cfg_file'].manifest_repo_abs_local_path, > os.path.normpath(manifest.general_config.pin_path)) > + pin_dir =3D os.path.join(manifest_repo_path, > + os.path.normpath(manifest.general_config.pin_path)) > pin_file_name =3D os.path.join(pin_dir, args.PinFileName) > elif args.push and manifest.general_config.pin_path is None: > raise EdkrepoManifestInvalidException(PIN_PATH_NOT_PRESENT) > @@ -104,7 +114,7 @@ class CreatePinCommand(EdkrepoCommand): >=20 > # commit and push the pin file > if args.push: > - manifest_repo =3D > Repo(config['cfg_file'].manifest_repo_abs_local_path) > + manifest_repo =3D Repo(manifest_repo_path) > # Create a local branch with the same name as the pin file = arg and > check it out before attempting the push > # to master > master_branch =3D manifest_repo.active_branch @@ -124,4 +13= 4,4 @@ > class CreatePinCommand(EdkrepoCommand): > manifest_repo.git.push('origin', 'HEAD:master') > finally: > manifest_repo.heads[master_branch.name].checkout() > - manifest_repo.delete_head(local_branch, '-D') > \ No newline at end of file > + manifest_repo.delete_head(local_branch, '-D') > -- > 2.16.2.windows.1 >=20 >=20 >=20