public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Desimone, Ashley E" <ashley.e.desimone@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Bjorge, Erik C" <erik.c.bjorge@intel.com>
Cc: "Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
	"Pandya, Puja" <puja.pandya@intel.com>,
	Bret Barkelew <Bret.Barkelew@microsoft.com>,
	"Agyeman, Prince" <prince.agyeman@intel.com>
Subject: Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 2/7] EdkRepo: Added ability to display archived combinations
Date: Wed, 1 Apr 2020 21:54:02 +0000	[thread overview]
Message-ID: <DM6PR11MB3628BE2CACE3F67423CE4367B2C90@DM6PR11MB3628.namprd11.prod.outlook.com> (raw)
In-Reply-To: <ff29f4ed09884c2b381e803fc137697832f0759b.1585694095.git.erik.c.bjorge@intel.com>

Reviewed-by: Ashley DeSimone <ashley.e.desimone@intel.com>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bjorge, Erik C
Sent: Tuesday, March 31, 2020 3:42 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Agyeman, Prince <prince.agyeman@intel.com>
Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 2/7] EdkRepo: Added ability to display archived combinations

Added support for using the -a / --archived flags to include archived combinations.

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
---
 edkrepo/commands/arguments/combo_args.py |  5 +++--
 edkrepo/commands/combo_command.py        | 19 +++++++++++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/edkrepo/commands/arguments/combo_args.py b/edkrepo/commands/arguments/combo_args.py
index af3ded9..dabb464 100644
--- a/edkrepo/commands/arguments/combo_args.py
+++ b/edkrepo/commands/arguments/combo_args.py
@@ -3,7 +3,7 @@
 ## @file
 # combo_args.py
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights 
+reserved.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent  #
 
@@ -11,4 +11,5 @@
 combo command meta data.
 '''
 
-COMMAND_DESCRIPTION = 'Displays the currently checked out combination and lists all available combinations.'
\ No newline at end of file
+COMMAND_DESCRIPTION = 'Displays the currently checked out combination and lists all available combinations.'
+ARCHIVED_HELP = 'Include a listing of archived combinations.'
diff --git a/edkrepo/commands/combo_command.py b/edkrepo/commands/combo_command.py
index 68d6854..9e13f47 100644
--- a/edkrepo/commands/combo_command.py
+++ b/edkrepo/commands/combo_command.py
@@ -3,10 +3,11 @@
 ## @file
 # combo_command.py
 #
-# Copyright (c) 2017- 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017- 2020, Intel Corporation. All rights reserved.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent  #  from colorama import Fore
+from colorama import Style
 
 from edkrepo.commands.edkrepo_command import EdkrepoCommand  from edkrepo.commands.edkrepo_command import ColorArgument @@ -25,6 +26,11 @@ class ComboCommand(EdkrepoCommand):
         metadata['help-text'] = arguments.COMMAND_DESCRIPTION
         args = []
         metadata['arguments'] = args
+        args.append({'name': 'archived',
+                     'short-name': 'a',
+                     'positional': False,
+                     'required': False,
+                     'help-text': arguments.ARCHIVED_HELP})
         args.append(ColorArgument)
         return metadata
 
@@ -32,9 +38,18 @@ class ComboCommand(EdkrepoCommand):
         init_color_console(args.color)
 
         manifest = get_workspace_manifest()
-        for combo in [c.name for c in manifest.combinations]:
+        combo_archive = []
+        combo_list = [c.name for c in manifest.combinations]
+        if args.archived:
+            combo_archive = [c.name for c in manifest.archived_combinations]
+            combo_list.extend(combo_archive)
+        if manifest.general_config.current_combo not in combo_list:
+            combo_list.append(manifest.general_config.current_combo)
+        for combo in sorted(combo_list):
             if combo == manifest.general_config.current_combo:
                 print("* {}{}{}".format(Fore.GREEN, combo, Fore.RESET))
+            elif combo in combo_archive:
+                print("  {}{}{}{}".format(Fore.YELLOW, Style.BRIGHT, 
+ combo, Style.RESET_ALL))
             else:
                 print("  {}".format(combo))
             if args.verbose:
--
2.21.0.windows.1





  reply	other threads:[~2020-04-01 21:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 22:41 [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos Bjorge, Erik C
2020-03-31 22:41 ` [edk2-staging/EdkRepo] [PATCH v1 1/7] EdkRepo: Adding support for archiving combos Bjorge, Erik C
2020-04-01 21:39   ` [edk2-devel] " Desimone, Ashley E
2020-03-31 22:41 ` [edk2-staging/EdkRepo] [PATCH v1 2/7] EdkRepo: Added ability to display archived combinations Bjorge, Erik C
2020-04-01 21:54   ` Desimone, Ashley E [this message]
2020-03-31 22:41 ` [edk2-staging/EdkRepo] [PATCH v1 3/7] EdkRepo: Update Checkout for archived combos Bjorge, Erik C
2020-04-01 22:00   ` [edk2-devel] " Desimone, Ashley E
2020-03-31 22:42 ` [edk2-staging/EdkRepo] [PATCH v1 4/7] EdkRepo: Update Sync " Bjorge, Erik C
2020-04-01 22:05   ` [edk2-devel] " Desimone, Ashley E
2020-03-31 22:42 ` [edk2-staging/EdkRepo] [PATCH v1 5/7] EdkRepo: Update Checkout Pin " Bjorge, Erik C
2020-04-01 22:08   ` [edk2-devel] " Desimone, Ashley E
2020-03-31 22:42 ` [edk2-staging/EdkRepo] [PATCH v1 6/7] EdkRepo: Update clone " Bjorge, Erik C
2020-04-01 22:10   ` [edk2-devel] " Desimone, Ashley E
2020-03-31 22:42 ` [edk2-staging/EdkRepo] [PATCH v1 7/7] EdkRepo: Update List Repos " Bjorge, Erik C
2020-04-01 22:16   ` [edk2-devel] " Desimone, Ashley E
2020-04-02  5:59 ` [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos Nate DeSimone
2020-04-02 17:02   ` Bjorge, Erik C
2020-04-03 22:27 ` Nate DeSimone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB3628BE2CACE3F67423CE4367B2C90@DM6PR11MB3628.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox