From mboxrd@z Thu Jan 1 00:00:00 1970 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:42:56 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: erik.c.bjorge@intel.com) IronPort-SDR: kfRneH3S6cRv7dCCn4UQ4NsuSeGT7VUaJLex5Y9mlK9CC8rEcGoJuE3kVM6b9/65Q3Vi5yv9zS 31u/psnLumtQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False 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:42:56 -0700 IronPort-SDR: T/C8TwJMhPc6jBG1FDWNfNkh2k2ZwL/pIvgbwTYrXgb7MUS/7G5tJ6e3/qFeZVgg+02i+U776f FbteQoc1jrKQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,329,1580803200"; d="scan'208";a="284168284" Received: from ecbjorge-mobl1.amr.corp.intel.com ([10.134.71.242]) by fmsmga002.fm.intel.com with ESMTP; 31 Mar 2020 15:42:55 -0700 From: "Bjorge, Erik C" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Bret Barkelew , Prince Agyeman Subject: [edk2-staging/EdkRepo] [PATCH v1 3/7] EdkRepo: Update Checkout for archived combos Date: Tue, 31 Mar 2020 15:41:59 -0700 Message-Id: <7a505db71f781f656e061acb6a48204b893eb2f7.1585694095.git.erik.c.bjorge@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Now either an active or archived branch combination can be checked out. Signed-off-by: Erik Bjorge Cc: Nate DeSimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman --- edkrepo/common/common_repo_functions.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/edkrepo/common/common_repo_functions.py b/edkrepo/common/common_repo_functions.py index 288dd27..160127b 100644 --- a/edkrepo/common/common_repo_functions.py +++ b/edkrepo/common/common_repo_functions.py @@ -494,8 +494,14 @@ def sort_commits(manifest, workspace_path, max_commits=None): return sorted_commit_list -def combination_is_in_manifest(combination, manifest): +def combinations_in_manifest(manifest): combination_names = [c.name for c in manifest.combinations] + combination_names.extend([c.name for c in manifest.archived_combinations]) + return combination_names + + +def combination_is_in_manifest(combination, manifest): + combination_names = combinations_in_manifest(manifest) return combination in combination_names @@ -557,7 +563,7 @@ def checkout(combination_or_sha, verbose=False, override=False, log=None): combo_or_sha = combination_or_sha try: # Try to handle normalize combo name to match the manifest file. - combo_or_sha = case_insensitive_single_match(combo_or_sha, [x.name for x in manifest.combinations]) + combo_or_sha = case_insensitive_single_match(combo_or_sha, combinations_in_manifest()) except: # No match so leave it alone. It must be a SHA1 or a bad combo name. pass -- 2.21.0.windows.1