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

Signed-off-by: Erik Bjorge <erik.c.bjo...@intel.com>
Cc: Nate DeSimone <nathaniel.l.desim...@intel.com>
Cc: Puja Pandya <puja.pan...@intel.com>
Cc: Bret Barkelew <bret.barke...@microsoft.com>
Cc: Prince Agyeman <prince.agye...@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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56788): https://edk2.groups.io/g/devel/message/56788
Mute This Topic: https://groups.io/mt/72688776/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to