From nobody Mon Feb 9 00:56:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+56793+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56793+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1585694581; cv=none; d=zohomail.com; s=zohoarc; b=YYW9bseDizOExIJpcfoTJbYKtK4+4J5QBjjLEVvSTPlMBhZ7oIofUUhmCZzbNdEBGY71c3RuSCyLwXPpZpxszPa0UcmsLo440MjsxG/xWkumpSVt8RrQof9oMqCm1bgwl3JcP3g1SKzcNsUyXw/Mc+uZV/VMOrPXuvsNPLx0b3c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585694581; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=q1rU67iV0BfZ7EXe6H+ogpq7nf1vmqAWl2GGQJrVvfE=; b=F+zRWf9KJYeZ55oDb4nDiicL7XS1R4HBzFZy19jBLYgfMNmoUBRUojrkVtMGgKuZ8lCRF+t2p9FgnQj6wSrV4kbH/z6AvgSqiBG0187bCKlZSAwOgdEUBBr9lsVa5uCUk9tEuNX7mwrahQuiivRJwNsrOTbqC1iy7cXAooefyGg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56793+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1585694581657169.37366166322806; Tue, 31 Mar 2020 15:43:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 5YiSYY1788612xmG41ZOKrX5; Tue, 31 Mar 2020 15:43:01 -0700 X-Received: from mga12.intel.com (mga12.intel.com []) by mx.groups.io with SMTP id smtpd.web12.418.1585694573550368246 for ; Tue, 31 Mar 2020 15:43:00 -0700 IronPort-SDR: AAzxtaGDP4pMEvygssGMCu/vynrhD9GW8kSLB+e0aFlm5jBaxJBkJ8y3xbo+ANjHH6taoqU9z1 nN03sBqFN4ng== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2020 15:43:00 -0700 IronPort-SDR: wIhusH7BUtmS6mmtHvg5n5Xu+6KhP5AVMAjXnogO1W5mTLx0c20kIH49eG77xuJiHCv09+JY3u qQFX/Z6CF3kA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,329,1580803200"; d="scan'208";a="284168318" X-Received: from ecbjorge-mobl1.amr.corp.intel.com ([10.134.71.242]) by fmsmga002.fm.intel.com with ESMTP; 31 Mar 2020 15:43:00 -0700 From: "Bjorge, Erik C" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Bret Barkelew , Prince Agyeman Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 7/7] EdkRepo: Update List Repos for archived combos Date: Tue, 31 Mar 2020 15:42:03 -0700 Message-Id: <71ddae1f98ff47c8f90e6d9fdf4967d3c1214100.1585694095.git.erik.c.bjorge@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,erik.c.bjorge@intel.com X-Gm-Message-State: 8NlfJD9hcxZLf7K5c9bpPSxhx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1585694581; bh=O3gk440bBn1llzSW00kG1mRmTLaUlGbuJqhFOsXvXNY=; h=Cc:Date:From:Reply-To:Subject:To; b=oFStv7mgEf1XmIa/2+d6ZMjee8vKBGKwBhAoP5VwCjL0MmjivbLELchbEDVhYWAv9JZ BxsU6T3l9QSAGz6hRGQApQdgqrPpMtIZVrewPIN+iM+NKP9A4BSmmG/SsDae6mkRLwrVT 4rElDvkzKpOMIKkKM7AT6OVykpWbsIHWBKw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" When running the List Repos command archived combos will not be listed unless the archived flag is provided. Signed-off-by: Erik Bjorge Cc: Nate DeSimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Reviewed-by: Ashley DeSimone --- 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/list= _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 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_combi= nations]) + 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 mak= e sure @@ -103,7 +106,10 @@ class ListReposCommand(EdkrepoCommand): #Determine the list of branches that used by any branch combin= ation in any manifest branches =3D set() for project_name in manifests: - for combo in [c.name for c in manifests[project_name].comb= inations]: + combo_list =3D [c.name for c in manifests[project_name].co= mbinations] + if args.archived: + combo_list.extend([c.name for c in manifests[project_n= ame].archived_combinations]) + for combo in combo_list: sources =3D manifests[project_name].get_repo_sources(c= ombo) for source in sources: if self.get_repo_url(source.remote_url) =3D=3D rep= o: @@ -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_name= ].combinations] + if args.archived: + combo_list.extend([c.name for c in manifests[proje= ct_name].archived_combinations]) + for combo in combo_list: sources =3D manifests[project_name].get_repo_sourc= es(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_FOUND) =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 alphabetically self.repo_names =3D collections.OrderedDict(sorted(self.repo_names= .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 lo= oking #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].combinat= ions]: + combo_list =3D [c.name for c in manifests[project_name].combin= ations] + 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_ur= l: @@ -209,7 +221,10 @@ class ListReposCommand(EdkrepoCommand): #If only 1 project uses this name, then append the pro= ject #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_na= me].combinations]: + combo_list =3D [c.name for c in manifests[project_= name].combinations] + if archived: + combo_list.extend([c.name for c in manifests[p= roject_name].archived_combinations]) + for combo in combo_list: sources =3D manifests[project_name].get_repo_s= ources(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_nam= e_frequency) - self.__repo_name_worker(old_repo_url, manifests) + self.__repo_name_worker(old_repo_url, manifests, a= rchived) else: #Use the name given by the second most manifest fi= les del names[best_name] --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#56793): https://edk2.groups.io/g/devel/message/56793 Mute This Topic: https://groups.io/mt/72688784/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-