From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.9856.1589082279192856720 for ; Sat, 09 May 2020 20:44:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=EjPrSZ4H; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: Uohn6QVvuye9+OEpLx7ytDuHq8qCD0Cq0cYmrZmyHeOfEAdpoF+h2iCJ9ZoZ5TBLnW44WsI6Rg jzltmAeff69Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2020 20:44:39 -0700 IronPort-SDR: ScxZh3PSMROUylV2+aqgx29Jw44hAcXXD1zeMbEywGoEKz+giuZwXRb4FGlrmzLIxcSo3Y74nH HkW2aYruNmCw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,374,1583222400"; d="scan'208";a="305861299" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 09 May 2020 20:44:39 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 20:44:38 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 20:44:38 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 9 May 2020 20:44:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IAtELY1D8/5XEcW/dWHhGLue0wFzxrUP9RN+REgTvghMSnXIMA0nmqQrUBBBlk659S5PDz4KF1exFl3xQk7FX/4IP/1ml9mq+RSdTXh5CIqlOUCFnon7sB1JdUM8bzlfBADVsDAZKjtbDhXwGRFohZaIk104qlkAkjNZLoSSDFtXj+c6SDRXeOP2BQ7cuOWuoa5lAsTNTPdATrJniTQ30Ay2eignLUOo2DlNm2y8EahWbBtEl05Zgpd6F5rGrbiFmt2l+1H9mDmbrbnXxzhjm51oRe78l/ohNuk79YrK+pYjvaZDiQedS/dMb5O6wdHcCtrls1e75kBJIPgb/nGVFg== 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=o1CYPTSXzmpSyvXOCzBvMuiiAngJsKcX3kLEKIRQbQs=; b=IwSzyKs1caDRhd0fIO/FfVs1SLS5VtrcGBlslSH07QCTDovS6xXb/YRpOJJSbUF4yA5NQqtojHxsMmDJZiv0N+UvcuW7E3Y5ccZTVN7brgzsYDIeSll1FuZj3vEg5rOZaAoWoHXiNQmo1LfqnVRBc1PayQ7e1f298Dvehc7HIVi9A17KenreYqj5uNYOEL3pbImvD5l+iXCRP8N7LlDpRPfuSC9/TwH9d6yBZviBXM1tn4KsJj0qpwt8ZHvX05r9mon2GsQEdPogIhEDhfkvOs65U2P9xzlVQ3Sr63U3N6r1i67LCWNCVDSA/k1wvK92dT27JEtXyUdj4z4aOEs3cQ== 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=o1CYPTSXzmpSyvXOCzBvMuiiAngJsKcX3kLEKIRQbQs=; b=EjPrSZ4H1tAJUdA7OP8yUm7WLlyuUD2E6UAkOJIZvqbOvbHsL6NIrdJCW93PZSBsiPZmrADqQ33RfLkyOaQzN2NGOwy6bAcUwcspDUtEVFC6h4Vb0He5xu+58uHeqypgTZHY9XiT2fg0s6yLCj65dVnD09MWRAyOY6kNpND84JQ= Received: from BL0PR11MB3489.namprd11.prod.outlook.com (2603:10b6:208:75::29) by BL0PR11MB3060.namprd11.prod.outlook.com (2603:10b6:208:72::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Sun, 10 May 2020 03:44:37 +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:44:37 +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: AQHWJno2HC2G6qkiJUOzFC5MOnnsQ6igrZfg Date: Sun, 10 May 2020 03:44:37 +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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDZhNDQzOTItNTgzNy00NTIzLWI0ZTEtNWVlM2Q5Y2VhMDAxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNjFVdFpheHVaa3k0OXVxRVJqVEhuU1hjKzgrTG9ETHpUcDRBOHJuU0htamorUnhuZ0xcLzJmS0U3YVBwekNURXYifQ== 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: d21a53b4-b41d-488a-4365-08d7f494764c x-ms-traffictypediagnostic: BL0PR11MB3060: 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: rDJIOuluZSUWj/2j0CeKrUaIhWa1E3GlTQXd8KC3TWdVK3bomv6t6oB6zNa6FyVqTlTScVXfToJbDdGWRCRnzgjs8+ykMf5tdSS/yKs6cUufAiWBkdJskoGD9de//jwh3dMhsHwaDqzgZEsceEXHfCMiSRHC6i6r2KanifaQYy9UCA8z5CIDqB3qgGPuUN4o5VIpgCHd95QX+zclJ1VlYjjEEUqzm0l454M36nr2SdwvdTg1I/S/UVKoMFbTVezHj7wYOkwGqBSLqDvNUsnb503zOK9Pj75M8pcrjiNMZdzdAzrzhq0ZygsQxBdAdWRqSWPO8bTa2MCoC6JgJieXMnXn1jR+ewHRz/ZlGSMu3dT924Rrj8/2u0X9StDeDrTFr3m3S7qUYonqHIWGqmcMe4jCd9ikLMYZhM18f4AH7LN8UGhy+B6wxsXOcg/xv7NSP/WEzLXWAuFwrBJWSP7mPxKjdyxXo2Lcau6NY2oxckasSr16TGPG9Sz5BYlbdsNtKy+XZDcCCaW11xUiw11ejF1lne1lHEEkBcRoD6NTGQXewE45+elEeMK52eZAnzdQfCMpx9eC7kZM6aRuzfOwq9t6IYX5G/IoPgVfvCJGZ+o= 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:(366004)(39860400002)(136003)(396003)(376002)(346002)(33430700001)(66476007)(316002)(71200400001)(66556008)(52536014)(6636002)(26005)(8936002)(53546011)(186003)(8676002)(966005)(6506007)(7696005)(5660300002)(107886003)(478600001)(33440700001)(86362001)(33656002)(64756008)(66446008)(110136005)(66946007)(2906002)(15650500001)(55016002)(9686003)(54906003)(4326008)(76116006);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: HkWSUh5SZpudTN3KF/92MIGqrvravJmv8PRh92Ihf9XekaDfe5PbtfBW/gq9BLZxSQmimXNwrX7PnXlwhMLG9D9sewY/a3ejsA7f2/kQKAYM9GnbegAIJQCpJ/I4d05oejU16iPYly2QxxfLE1FB3oWdCVg0ey0i5cLffRPWGaITF+Q3PYm/oRKpmWGlP7ultdwfdDOfWiYIV+r3vPV7wVmlnt+pfmu/jJPDCFQR6oNtrnTrBK083i1v50mszW69BPB5/GN3M//r5YS6p3hOlt9WPONc4vUJAqonjYFiLAyye9S06GUG2hI5g9ldiXg6D83qdSAeO+hilHuEneaxW0BkB5+o/jk9nEBBHPa66P1+sloRXklbleawqHF1eR+/5VhVVfpsmwoaynEfrucDegBBndhV7JCkrZWKs8A+t6sZ/mR1l2jeFtwHEtM3Guyt5yP+bEiFdA2sjaxoXzr2v1oBK9qFbDYkZiarWD6Ti1Y= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: d21a53b4-b41d-488a-4365-08d7f494764c X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2020 03:44:37.1522 (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: OzZ7LHBhg9FNdEX+bqhZrwICoVnLIAwIzhnTdzVaKSHHUnCPTrfMIWakkTECpEgtnAPw20NDbztN1RO8ALpvWP73eK0GO34bT20K17QDC20= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3060 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 Reviewed-by: Nate DeSimone > -----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