From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web12.1304.1585779388466389893 for ; Wed, 01 Apr 2020 15:16:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=ruQJdIOJ; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: ashley.e.desimone@intel.com) IronPort-SDR: URr0gHsOvpiURhm+mStKXGQgbkUmWLUckDAX3YOtwtpOxIWVvSV3xBe7cIfrc+D96WxvnIbtWp 3pEdMagBQuww== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2020 15:16:28 -0700 IronPort-SDR: dgAYtBAxm1ibWih1sxPQ8e/FFA/j6SD/pivI+uJjA/uBC6vXyu/D+Eg0Q9AiC/uF61SUk91V2F HEM5FZFA2g8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,333,1580803200"; d="scan'208";a="273329393" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by fmsmga004.fm.intel.com with ESMTP; 01 Apr 2020 15:16:27 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 1 Apr 2020 15:16:25 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 1 Apr 2020 15:16:24 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 1 Apr 2020 15:16:24 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 1 Apr 2020 15:16:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CFhpeI07ndvShZlkEGKR3TGaD0r3+Hl5nk0p+vxbeMJpcPAHnvT57lEq+Imn1x2l9av/h23M2st+jDQAFfDXsGRMDIhxf5iSbpKxmhiuotMt/hcFMMYfaaiaiz/B9a+oQ6MvwrlebJy2APwu5KSbeMpNof9PbTb9/CCUAiPtqysvnZwsAOb3A4hg6b4TqO6kZ4rHz4fVIdz6gaoU81+y1I5s6Ck3K4kJKoZWzAIvpSTJHVUNia1e5PqxH3x3CMGGsaKXpqBNVYgUc1YAGRrjuXl1805HgvJBXA4v9Wr1+ld5UkVd/+oxQNdpIRGH7BTCliHfE+jrlNYarJLTMAtv0A== 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=od13duo8KtlAuWGrzA1MdnEFfGnEQcEnriK1m+dhOOM=; b=VvWQIYHevtF1eNbNfBhRZzkcSHfp4vLhThJkB+qyDbM2oKXB4ytx6SpZ0JX9XMtZ9xAkMZHgd3Y0c/hj8gRbQMK0Y/JJ+VOS90GNwgdI4bQnudW6xu45WRIb3KMz5Hy5pcWazYYXGYShFgIHSCvAxzePl5NuuzIOwDODHHqRvTIPmFQFXCCDU7cGWVJYryQuzUorR4G/BKNO4dnI0L7ifBEZIumSbWf6q53/SejO2crTdxNXAKSXt+YN6bMRDWf7aUu6rC8CK+d91kiDIp6KlELhHBF5hpsvhhT0hfHAQR6A1E053hUgPErBqkYkCxbzc9MzCiFjzMfVO/fm0GX18w== 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=od13duo8KtlAuWGrzA1MdnEFfGnEQcEnriK1m+dhOOM=; b=ruQJdIOJAyGfsk+aOIOMcwj2dPz4D84YeAqB3ifWhb2in+kffje3FjW6UynlakKaPjvIQZvdrbL6HatcbvYLYwZUOfLqzD5AwbMUEu+qTvxgiVrAT89Cs1BOZlo/1q6ygp5cRqKJK2mCP+Cx8RaV19UoT8v4sTHUCzJmhRkMLZA= Received: from DM6PR11MB3628.namprd11.prod.outlook.com (2603:10b6:5:144::25) by DM6PR11MB3499.namprd11.prod.outlook.com (2603:10b6:5:61::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.19; Wed, 1 Apr 2020 22:16:19 +0000 Received: from DM6PR11MB3628.namprd11.prod.outlook.com ([fe80::5904:e7d9:f64d:9a7e]) by DM6PR11MB3628.namprd11.prod.outlook.com ([fe80::5904:e7d9:f64d:9a7e%3]) with mapi id 15.20.2878.014; Wed, 1 Apr 2020 22:16:19 +0000 From: "Desimone, Ashley E" To: "devel@edk2.groups.io" , "Bjorge, Erik C" CC: "Desimone, Nathaniel L" , "Pandya, Puja" , Bret Barkelew , "Agyeman, Prince" Subject: Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 7/7] EdkRepo: Update List Repos for archived combos Thread-Topic: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 7/7] EdkRepo: Update List Repos for archived combos Thread-Index: AQHWB63QELDORfBzhU+iW7XvwARX9ahk1tzA Date: Wed, 1 Apr 2020 22:16:19 +0000 Message-ID: References: <71ddae1f98ff47c8f90e6d9fdf4967d3c1214100.1585694095.git.erik.c.bjorge@intel.com> In-Reply-To: <71ddae1f98ff47c8f90e6d9fdf4967d3c1214100.1585694095.git.erik.c.bjorge@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: spf=none (sender IP is ) smtp.mailfrom=ashley.e.desimone@intel.com; x-originating-ip: [134.134.136.213] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 92ea7e2c-1b8f-46d4-2b94-08d7d68a4e0f x-ms-traffictypediagnostic: DM6PR11MB3499: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 03607C04F0 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB3628.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(376002)(346002)(136003)(39860400002)(366004)(396003)(6506007)(55016002)(66946007)(66476007)(33656002)(53546011)(186003)(86362001)(76116006)(66556008)(26005)(71200400001)(64756008)(15650500001)(316002)(66446008)(54906003)(6636002)(110136005)(81156014)(52536014)(5660300002)(478600001)(4326008)(966005)(7696005)(8936002)(107886003)(81166006)(9686003)(8676002)(2906002);DIR:OUT;SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cpopPc7dtyhDxeYYMlMjIg/GSIxEmYj+5w38E2z+9PQvaoRwD5RvOt+dp1Rba/4au2xMPthrwtxE3+oOg7pg7NdXah1+mUPLloB5MqCjpY/AkxxzGuHyz49kCMz2z5O+b4JiTxJq2l2snRik8vcIIAl7uLU37v/MS2JxPS5SV59PWwurytty5dU09+Op2dwqwp1FtsDNpyQBmgxgOvtmFnDpzsTEo607ajD2jWiS+QdYoLdko91m0xx9FNtRxQfK6U6MQcBo69k+7TzPvahLG47juMp9kLxxCPncnIm2KcVYZQSQjwDTXlC5XhTDYcc9QQSIqwVdACTYtdLSFjjRnnA0N7ThWBuywG3UPBAYE5huG58ZnZwv3ZsR6qvIaboFVN7Kc9d0fs6U5o9O3CNl4hG5mupWk79Qcl3fXzjF9BiydILAbBFCTMBmi+6oMJQOLfjMamy5pabZ7/8WPICSPb4XDNttdygb3+ojjJrQZF+iJ4a8In2oiwSMiRg4izScZexJ+kVnxQdchIOU4xjORQ== x-ms-exchange-antispam-messagedata: CMDfBGfoWwzkTZ36jpyPwKTii/w/nXXH1UU6Rh4jP54TpEz6DfwQEDIp9XTgbmcLl9zyv3oW2j7GyvV3eF/VcEAgwoOqM7sM4nRwfA0lL2guZkpgOzJx72UcoTdYPVK55l5NB8aLKOmKpBmP5q6RLw== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 92ea7e2c-1b8f-46d4-2b94-08d7d68a4e0f X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Apr 2020 22:16:19.7753 (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: bMRrlZUV8IRF+Iba/ihMql4XbafWHLgAUgeGpzBPPOo0DvuThaSBKcd6BSEB4bqnoMzy0V2DmjFMbl7yM4u9rWnrMSpk0Gae9IcJ7POrCuE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3499 Return-Path: ashley.e.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: Ashley DeSimone -----Original Message----- From: devel@edk2.groups.io On Behalf Of Bjorge, Eri= k C Sent: Tuesday, March 31, 2020 3:42 PM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Pandya, Puja <= puja.pandya@intel.com>; Bret Barkelew ; Agyema= n, Prince Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 7/7] EdkRepo: Updat= e List Repos for archived combos When running the List Repos command archived combos will not be listed unl= ess the archived flag is provided. Signed-off-by: Erik Bjorge Cc: Nate DeSimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman --- edkrepo/commands/list_repos_command.py | 37 ++++++++++++++++++-------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/edkrepo/commands/list_repos_command.py b/edkrepo/commands/lis= t_repos_command.py index caf0373..b06a493 100644 --- a/edkrepo/commands/list_repos_command.py +++ b/edkrepo/commands/list_repos_command.py @@ -3,7 +3,7 @@ ## @file # list_repos_command.py # -# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights=20 +reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # =20 @@ -74,7 +74,10 @@ class ListReposCommand(EdkrepoCommand): xml_file =3D ci_index_xml.get_project_xml(project) manifest =3D ManifestXml(os.path.normpath(os.path.join(global= _manifest_directory, xml_file))) manifests[project] =3D manifest - for combo in [c.name for c in manifest.combinations]: + combo_list =3D [c.name for c in manifest.combinations] + if args.archived: + combo_list.extend([c.name for c in manifest.archived_comb= inations]) + for combo in combo_list: sources =3D manifest.get_repo_sources(combo) for source in sources: repo_urls.add(self.get_repo_url(source.remote_url)) @@ -84,7 +87,7 @@ class ListReposCommand(EdkrepoCommand): project_justify =3D len(max(manifests.keys(), key=3Dlen)) =20 #Determine the names of the repositories - self.generate_repo_names(repo_urls, manifests) + self.generate_repo_names(repo_urls, manifests, args.archived) print(humble.REPOSITORIES) =20 #If the user provided a list of repositories to view, check to ma= ke sure @@ -103,7 +106,10 @@ class ListReposCommand(EdkrepoCommand): #Determine the list of branches that used by any branch combi= nation in any manifest branches =3D set() for project_name in manifests: - for combo in [c.name for c in manifests[project_name].com= binations]: + combo_list =3D [c.name for c in manifests[project_name].c= ombinations] + if args.archived: + combo_list.extend([c.name for c in manifests[project_= name].archived_combinations]) + for combo in combo_list: sources =3D manifests[project_name].get_repo_sources(= combo) for source in sources: if self.get_repo_url(source.remote_url) =3D=3D re= po: @@ -124,7 +130,10 @@ class ListReposCommand(EdkrepoCommand): #Determine the branch combinations that use that branch for project_name in manifests: combos =3D [] - for combo in [c.name for c in manifests[project_name]= .combinations]: + combo_list =3D [c.name for c in manifests[project_nam= e].combinations] + if args.archived: + combo_list.extend([c.name for c in manifests[proj= ect_name].archived_combinations]) + for combo in combo_list: sources =3D manifests[project_name].get_repo_sour= ces(combo) for source in sources: if self.get_repo_url(source.remote_url) =3D= =3D repo and source.branch =3D=3D branch: @@ -165,11 +174,11 @@ class ListReposCommand(EdkrepoCommand): return name raise EdkrepoInvalidParametersException(humble.REPO_NAME_NOT_FOUN= D) =20 - def generate_repo_names(self, repo_urls, manifests): + def generate_repo_names(self, repo_urls, manifests, archived=3DFalse)= : #Determine the names of the repositories self.repo_names =3D collections.OrderedDict() for repo_url in repo_urls: - self.__repo_name_worker(repo_url, manifests) + self.__repo_name_worker(repo_url, manifests, archived) =20 #Sort the git repositories so they will be displayed alphabetical= ly self.repo_names =3D collections.OrderedDict(sorted(self.repo_name= s.items())) @@ -188,12 +197,15 @@ class ListReposCommand(EdkrepoCommand): for name_to_move in names_to_move: self.repo_names.move_to_end(name_to_move, False) =20 - def __repo_name_worker(self, repo_url, manifests): + def __repo_name_worker(self, repo_url, manifests, archived=3DFalse): #This is a heuristic that guesses the "name" of a repository by l= ooking #at the name given to it by the most manifest files. names =3D collections.defaultdict(int) for project_name in manifests: - for combo in [c.name for c in manifests[project_name].combina= tions]: + combo_list =3D [c.name for c in manifests[project_name].combi= nations] + if archived: + combo_list.extend([c.name for c in manifests[project_name= ].archived_combinations]) + for combo in combo_list: sources =3D manifests[project_name].get_repo_sources(comb= o) for source in sources: if self.get_repo_url(source.remote_url) =3D=3D repo_u= rl: @@ -209,7 +221,10 @@ class ListReposCommand(EdkrepoCommand): #If only 1 project uses this name, then append the pr= oject #name to the directory name to create the repo name for project_name in manifests: - for combo in [c.name for c in manifests[project_n= ame].combinations]: + combo_list =3D [c.name for c in manifests[project= _name].combinations] + if archived: + combo_list.extend([c.name for c in manifests[= project_name].archived_combinations]) + for combo in combo_list: sources =3D manifests[project_name].get_repo_= sources(combo) for source in sources: if self.get_repo_url(source.remote_url) = =3D=3D repo_url and source.root =3D=3D original_best_name: @@ -239,7 +254,7 @@ class ListReposCommand(EdkrepoCommand): del self.repo_names[best_name] found_unique_name =3D True self.repo_names[best_name] =3D (repo_url, best_na= me_frequency) - self.__repo_name_worker(old_repo_url, manifests) + self.__repo_name_worker(old_repo_url,=20 + manifests, archived) else: #Use the name given by the second most manifest f= iles del names[best_name] -- 2.21.0.windows.1