* [edk2-staging/EdkRepo] [PATCH v1 1/7] EdkRepo: Adding support for archiving combos
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 ` 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
` (7 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Bjorge, Erik C @ 2020-03-31 22:41 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya, Bret Barkelew, Prince Agyeman
Adding support to check the archived attribute on branch combos. This
allows a combo to be archived and available if required but not dirty
up the combo list.
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_manifest_parser/edk_manifest.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/edkrepo_manifest_parser/edk_manifest.py b/edkrepo_manifest_parser/edk_manifest.py
index dd3512b..7b513dc 100644
--- a/edkrepo_manifest_parser/edk_manifest.py
+++ b/edkrepo_manifest_parser/edk_manifest.py
@@ -306,7 +306,11 @@ class ManifestXml(BaseXmlHelper):
@property
def combinations(self):
- return self._tuple_list(self.__combinations.values())
+ return self._tuple_list([x for x in self.__combinations.values() if not x.archived])
+
+ @property
+ def archived_combinations(self):
+ return self._tuple_list([x for x in self.__combinations.values() if x.archived])
def get_repo_sources(self, combo_name):
if combo_name in self.__combo_sources:
@@ -645,6 +649,10 @@ class _Combination():
self.description = element.attrib['description']
except:
self.description = None #description is optional attribute
+ try:
+ self.archived = (element.attrib['archived'].lower() == 'true')
+ except:
+ self.archived = False
@property
def tuple(self):
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 1/7] EdkRepo: Adding support for archiving combos
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 ` Desimone, Ashley E
0 siblings, 0 replies; 18+ messages in thread
From: Desimone, Ashley E @ 2020-04-01 21:39 UTC (permalink / raw)
To: devel@edk2.groups.io, Bjorge, Erik C
Cc: Desimone, Nathaniel L, Pandya, Puja, Bret Barkelew,
Agyeman, Prince
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 1/7] EdkRepo: Adding support for archiving combos
Adding support to check the archived attribute on branch combos. This allows a combo to be archived and available if required but not dirty up the combo list.
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_manifest_parser/edk_manifest.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/edkrepo_manifest_parser/edk_manifest.py b/edkrepo_manifest_parser/edk_manifest.py
index dd3512b..7b513dc 100644
--- a/edkrepo_manifest_parser/edk_manifest.py
+++ b/edkrepo_manifest_parser/edk_manifest.py
@@ -306,7 +306,11 @@ class ManifestXml(BaseXmlHelper):
@property
def combinations(self):
- return self._tuple_list(self.__combinations.values())
+ return self._tuple_list([x for x in
+ self.__combinations.values() if not x.archived])
+
+ @property
+ def archived_combinations(self):
+ return self._tuple_list([x for x in
+ self.__combinations.values() if x.archived])
def get_repo_sources(self, combo_name):
if combo_name in self.__combo_sources:
@@ -645,6 +649,10 @@ class _Combination():
self.description = element.attrib['description']
except:
self.description = None #description is optional attribute
+ try:
+ self.archived = (element.attrib['archived'].lower() == 'true')
+ except:
+ self.archived = False
@property
def tuple(self):
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [edk2-staging/EdkRepo] [PATCH v1 2/7] EdkRepo: Added ability to display archived combinations
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-03-31 22:41 ` Bjorge, Erik C
2020-04-01 21:54 ` [edk2-devel] " Desimone, Ashley E
2020-03-31 22:41 ` [edk2-staging/EdkRepo] [PATCH v1 3/7] EdkRepo: Update Checkout for archived combos Bjorge, Erik C
` (6 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Bjorge, Erik C @ 2020-03-31 22:41 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya, Bret Barkelew, Prince Agyeman
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
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 2/7] EdkRepo: Added ability to display archived combinations
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
0 siblings, 0 replies; 18+ messages in thread
From: Desimone, Ashley E @ 2020-04-01 21:54 UTC (permalink / raw)
To: devel@edk2.groups.io, Bjorge, Erik C
Cc: Desimone, Nathaniel L, Pandya, Puja, Bret Barkelew,
Agyeman, Prince
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
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [edk2-staging/EdkRepo] [PATCH v1 3/7] EdkRepo: Update Checkout for archived combos
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-03-31 22:41 ` [edk2-staging/EdkRepo] [PATCH v1 2/7] EdkRepo: Added ability to display archived combinations Bjorge, Erik C
@ 2020-03-31 22:41 ` 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
` (5 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Bjorge, Erik C @ 2020-03-31 22:41 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya, Bret Barkelew, Prince Agyeman
Now either an active or archived branch combination can be checked out.
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/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
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 3/7] EdkRepo: Update Checkout for archived combos
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 ` Desimone, Ashley E
0 siblings, 0 replies; 18+ messages in thread
From: Desimone, Ashley E @ 2020-04-01 22:00 UTC (permalink / raw)
To: devel@edk2.groups.io, Bjorge, Erik C
Cc: Desimone, Nathaniel L, Pandya, Puja, Bret Barkelew,
Agyeman, Prince
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 3/7] EdkRepo: Update Checkout for archived combos
Now either an active or archived branch combination can be checked out.
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/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
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [edk2-staging/EdkRepo] [PATCH v1 4/7] EdkRepo: Update Sync for archived combos
2020-03-31 22:41 [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos Bjorge, Erik C
` (2 preceding siblings ...)
2020-03-31 22:41 ` [edk2-staging/EdkRepo] [PATCH v1 3/7] EdkRepo: Update Checkout for archived combos Bjorge, Erik C
@ 2020-03-31 22:42 ` 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
` (4 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Bjorge, Erik C @ 2020-03-31 22:42 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya, Bret Barkelew, Prince Agyeman
Added support for archived combos in Sync command.
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/sync_command.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/edkrepo/commands/sync_command.py b/edkrepo/commands/sync_command.py
index 71c600a..daa558f 100644
--- a/edkrepo/commands/sync_command.py
+++ b/edkrepo/commands/sync_command.py
@@ -3,7 +3,7 @@
## @file
# sync_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
#
@@ -19,7 +19,7 @@ from git import Repo
# Our modules
from edkrepo.commands.edkrepo_command import EdkrepoCommand
from edkrepo.commands.edkrepo_command import DryRunArgument, SubmoduleSkipArgument
-import edkrepo.commands.arguments.sync_args as arguments
+import edkrepo.commands.arguments.sync_args as arguments
from edkrepo.common.progress_handler import GitProgressHandler
from edkrepo.common.edkrepo_exception import EdkrepoUncommitedChangesException, EdkrepoManifestNotFoundException
from edkrepo.common.edkrepo_exception import EdkrepoManifestChangedException
@@ -38,7 +38,7 @@ from edkrepo.common.common_repo_functions import generate_name_for_obsolete_back
from edkrepo.common.common_repo_functions import update_editor_config
from edkrepo.common.common_repo_functions import update_repo_commit_template, get_latest_sha
from edkrepo.common.common_repo_functions import has_primary_repo_remote, fetch_from_primary_repo, in_sync_with_primary
-from edkrepo.common.common_repo_functions import update_hooks, maintain_submodules
+from edkrepo.common.common_repo_functions import update_hooks, maintain_submodules, combinations_in_manifest
from edkrepo.common.common_repo_functions import write_included_config, remove_included_config
from edkrepo.common.ui_functions import init_color_console
from edkrepo.config.config_factory import get_workspace_path, get_workspace_manifest, get_edkrepo_global_data_directory
@@ -53,22 +53,22 @@ class SyncCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'sync'
- metadata['help-text'] = arguments.COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append({'name' : 'fetch',
'positional' : False,
'required' : False,
- 'help-text': arguments.FETCH_HELP})
+ 'help-text': arguments.FETCH_HELP})
args.append({'name' : 'update-local-manifest',
'short-name': 'u',
'required' : False,
- 'help-text' : arguments.UPDATE_LOCAL_MANIFEST_HELP})
+ 'help-text' : arguments.UPDATE_LOCAL_MANIFEST_HELP})
args.append({'name' : 'override',
'short-name': 'o',
'positional' : False,
'required' : False,
- 'help-text' : arguments.OVERRIDE_HELP})
+ 'help-text' : arguments.OVERRIDE_HELP})
args.append(SubmoduleSkipArgument)
return metadata
@@ -222,7 +222,7 @@ class SyncCommand(EdkrepoCommand):
if initial_manifest_remotes[remote_name] != new_manifest_remotes[remote_name]:
raise EdkrepoManifestChangedException(SYNC_URL_CHANGE.format(remote_name))
#check to see if the currently checked out combo exists in the new manifest.
- new_combos = [c.name for c in new_manifest_to_check.combinations]
+ new_combos = combinations_in_manifest(new_manifest_to_check)
if current_combo not in new_combos:
raise EdkrepoManifestChangedException(SYNC_COMBO_CHANGE.format(current_combo,
initial_manifest.project_info.codename))
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 4/7] EdkRepo: Update Sync for archived combos
2020-03-31 22:42 ` [edk2-staging/EdkRepo] [PATCH v1 4/7] EdkRepo: Update Sync " Bjorge, Erik C
@ 2020-04-01 22:05 ` Desimone, Ashley E
0 siblings, 0 replies; 18+ messages in thread
From: Desimone, Ashley E @ 2020-04-01 22:05 UTC (permalink / raw)
To: devel@edk2.groups.io, Bjorge, Erik C
Cc: Desimone, Nathaniel L, Pandya, Puja, Bret Barkelew,
Agyeman, Prince
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 4/7] EdkRepo: Update Sync for archived combos
Added support for archived combos in Sync command.
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/sync_command.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/edkrepo/commands/sync_command.py b/edkrepo/commands/sync_command.py
index 71c600a..daa558f 100644
--- a/edkrepo/commands/sync_command.py
+++ b/edkrepo/commands/sync_command.py
@@ -3,7 +3,7 @@
## @file
# sync_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 #
@@ -19,7 +19,7 @@ from git import Repo
# Our modules
from edkrepo.commands.edkrepo_command import EdkrepoCommand from edkrepo.commands.edkrepo_command import DryRunArgument, SubmoduleSkipArgument -import edkrepo.commands.arguments.sync_args as arguments
+import edkrepo.commands.arguments.sync_args as arguments
from edkrepo.common.progress_handler import GitProgressHandler from edkrepo.common.edkrepo_exception import EdkrepoUncommitedChangesException, EdkrepoManifestNotFoundException from edkrepo.common.edkrepo_exception import EdkrepoManifestChangedException @@ -38,7 +38,7 @@ from edkrepo.common.common_repo_functions import generate_name_for_obsolete_back from edkrepo.common.common_repo_functions import update_editor_config from edkrepo.common.common_repo_functions import update_repo_commit_template, get_latest_sha from edkrepo.common.common_repo_functions import has_primary_repo_remote, fetch_from_primary_repo, in_sync_with_primary -from edkrepo.common.common_repo_functions import update_hooks, maintain_submodules
+from edkrepo.common.common_repo_functions import update_hooks,
+maintain_submodules, combinations_in_manifest
from edkrepo.common.common_repo_functions import write_included_config, remove_included_config from edkrepo.common.ui_functions import init_color_console from edkrepo.config.config_factory import get_workspace_path, get_workspace_manifest, get_edkrepo_global_data_directory @@ -53,22 +53,22 @@ class SyncCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'sync'
- metadata['help-text'] = arguments.COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append({'name' : 'fetch',
'positional' : False,
'required' : False,
- 'help-text': arguments.FETCH_HELP})
+ 'help-text': arguments.FETCH_HELP})
args.append({'name' : 'update-local-manifest',
'short-name': 'u',
'required' : False,
- 'help-text' : arguments.UPDATE_LOCAL_MANIFEST_HELP})
+ 'help-text' :
+ arguments.UPDATE_LOCAL_MANIFEST_HELP})
args.append({'name' : 'override',
'short-name': 'o',
'positional' : False,
'required' : False,
- 'help-text' : arguments.OVERRIDE_HELP})
+ 'help-text' : arguments.OVERRIDE_HELP})
args.append(SubmoduleSkipArgument)
return metadata
@@ -222,7 +222,7 @@ class SyncCommand(EdkrepoCommand):
if initial_manifest_remotes[remote_name] != new_manifest_remotes[remote_name]:
raise EdkrepoManifestChangedException(SYNC_URL_CHANGE.format(remote_name))
#check to see if the currently checked out combo exists in the new manifest.
- new_combos = [c.name for c in new_manifest_to_check.combinations]
+ new_combos = combinations_in_manifest(new_manifest_to_check)
if current_combo not in new_combos:
raise EdkrepoManifestChangedException(SYNC_COMBO_CHANGE.format(current_combo,
initial_manifest.project_info.codename))
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [edk2-staging/EdkRepo] [PATCH v1 5/7] EdkRepo: Update Checkout Pin for archived combos
2020-03-31 22:41 [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos Bjorge, Erik C
` (3 preceding siblings ...)
2020-03-31 22:42 ` [edk2-staging/EdkRepo] [PATCH v1 4/7] EdkRepo: Update Sync " Bjorge, Erik C
@ 2020-03-31 22:42 ` 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
` (3 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Bjorge, Erik C @ 2020-03-31 22:42 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya, Bret Barkelew, Prince Agyeman
Added support for archived combos in the Checkout Pin command.
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/checkout_pin_command.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/edkrepo/commands/checkout_pin_command.py b/edkrepo/commands/checkout_pin_command.py
index a2afc41..858271a 100644
--- a/edkrepo/commands/checkout_pin_command.py
+++ b/edkrepo/commands/checkout_pin_command.py
@@ -15,7 +15,7 @@ from edkrepo.commands.edkrepo_command import EdkrepoCommand, OverrideArgument
import edkrepo.commands.arguments.checkout_pin_args as arguments
import edkrepo.commands.humble.checkout_pin_humble as humble
from edkrepo.common.common_repo_functions import sparse_checkout_enabled, reset_sparse_checkout, sparse_checkout
-from edkrepo.common.common_repo_functions import check_dirty_repos, checkout_repos
+from edkrepo.common.common_repo_functions import check_dirty_repos, checkout_repos, combinations_in_manifest
from edkrepo.common.humble import SPARSE_CHECKOUT, SPARSE_RESET
from edkrepo.common.edkrepo_exception import EdkrepoInvalidParametersException, EdkrepoProjectMismatchException
from edkrepo.config.config_factory import get_workspace_path, get_workspace_manifest
@@ -89,7 +89,7 @@ class CheckoutPinCommand(EdkrepoCommand):
raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH)
elif not set(pin.remotes).issubset(set(manifest.remotes)):
raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH)
- elif pin.general_config.current_combo not in [c.name for c in manifest.combinations]:
+ elif pin.general_config.current_combo not in combinations_in_manifest(manifest):
raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH)
combo_name = pin.general_config.current_combo
pin_sources = pin.get_repo_sources(combo_name)
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 5/7] EdkRepo: Update Checkout Pin for archived combos
2020-03-31 22:42 ` [edk2-staging/EdkRepo] [PATCH v1 5/7] EdkRepo: Update Checkout Pin " Bjorge, Erik C
@ 2020-04-01 22:08 ` Desimone, Ashley E
0 siblings, 0 replies; 18+ messages in thread
From: Desimone, Ashley E @ 2020-04-01 22:08 UTC (permalink / raw)
To: devel@edk2.groups.io, Bjorge, Erik C
Cc: Desimone, Nathaniel L, Pandya, Puja, Bret Barkelew,
Agyeman, Prince
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 5/7] EdkRepo: Update Checkout Pin for archived combos
Added support for archived combos in the Checkout Pin command.
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/checkout_pin_command.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/edkrepo/commands/checkout_pin_command.py b/edkrepo/commands/checkout_pin_command.py
index a2afc41..858271a 100644
--- a/edkrepo/commands/checkout_pin_command.py
+++ b/edkrepo/commands/checkout_pin_command.py
@@ -15,7 +15,7 @@ from edkrepo.commands.edkrepo_command import EdkrepoCommand, OverrideArgument import edkrepo.commands.arguments.checkout_pin_args as arguments import edkrepo.commands.humble.checkout_pin_humble as humble from edkrepo.common.common_repo_functions import sparse_checkout_enabled, reset_sparse_checkout, sparse_checkout -from edkrepo.common.common_repo_functions import check_dirty_repos, checkout_repos
+from edkrepo.common.common_repo_functions import check_dirty_repos,
+checkout_repos, combinations_in_manifest
from edkrepo.common.humble import SPARSE_CHECKOUT, SPARSE_RESET from edkrepo.common.edkrepo_exception import EdkrepoInvalidParametersException, EdkrepoProjectMismatchException from edkrepo.config.config_factory import get_workspace_path, get_workspace_manifest @@ -89,7 +89,7 @@ class CheckoutPinCommand(EdkrepoCommand):
raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH)
elif not set(pin.remotes).issubset(set(manifest.remotes)):
raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH)
- elif pin.general_config.current_combo not in [c.name for c in manifest.combinations]:
+ elif pin.general_config.current_combo not in combinations_in_manifest(manifest):
raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH)
combo_name = pin.general_config.current_combo
pin_sources = pin.get_repo_sources(combo_name)
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [edk2-staging/EdkRepo] [PATCH v1 6/7] EdkRepo: Update clone for archived combos
2020-03-31 22:41 [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos Bjorge, Erik C
` (4 preceding siblings ...)
2020-03-31 22:42 ` [edk2-staging/EdkRepo] [PATCH v1 5/7] EdkRepo: Update Checkout Pin " Bjorge, Erik C
@ 2020-03-31 22:42 ` 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
` (2 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Bjorge, Erik C @ 2020-03-31 22:42 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya, Bret Barkelew, Prince Agyeman
Adding support for archived combos in the clone command.
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/clone_command.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/edkrepo/commands/clone_command.py b/edkrepo/commands/clone_command.py
index 2400272..701a853 100644
--- a/edkrepo/commands/clone_command.py
+++ b/edkrepo/commands/clone_command.py
@@ -3,7 +3,7 @@
## @file
# clone_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
#
@@ -16,7 +16,7 @@ import edkrepo.commands.arguments.clone_args as arguments
from edkrepo.common.common_repo_functions import pull_latest_manifest_repo, clone_repos, sparse_checkout, verify_manifest_data
from edkrepo.common.common_repo_functions import case_insensitive_single_match, update_editor_config
from edkrepo.common.common_repo_functions import write_included_config, write_conditional_include
-from edkrepo.common.common_repo_functions import find_project_in_index
+from edkrepo.common.common_repo_functions import find_project_in_index, combinations_in_manifest
from edkrepo.common.edkrepo_exception import EdkrepoInvalidParametersException, EdkrepoManifestInvalidException
from edkrepo.common.humble import CLONE_INVALID_WORKSPACE, CLONE_INVALID_PROJECT_ARG, CLONE_INVALID_COMBO_ARG
from edkrepo.common.humble import SPARSE_CHECKOUT, CLONE_INVALID_LOCAL_ROOTS
@@ -99,7 +99,7 @@ class CloneCommand(EdkrepoCommand):
combo_name = None
if args.Combination is not None:
try:
- combo_name = case_insensitive_single_match(args.Combination, [x.name for x in manifest.combinations])
+ combo_name = case_insensitive_single_match(args.Combination, combinations_in_manifest(manifest))
except:
#remove the repo directory and Manifest.xml from the workspace so the next time the user trys to clone
#they will have an empty workspace and then raise an exception
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 6/7] EdkRepo: Update clone for archived combos
2020-03-31 22:42 ` [edk2-staging/EdkRepo] [PATCH v1 6/7] EdkRepo: Update clone " Bjorge, Erik C
@ 2020-04-01 22:10 ` Desimone, Ashley E
0 siblings, 0 replies; 18+ messages in thread
From: Desimone, Ashley E @ 2020-04-01 22:10 UTC (permalink / raw)
To: devel@edk2.groups.io, Bjorge, Erik C
Cc: Desimone, Nathaniel L, Pandya, Puja, Bret Barkelew,
Agyeman, Prince
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 6/7] EdkRepo: Update clone for archived combos
Adding support for archived combos in the clone command.
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/clone_command.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/edkrepo/commands/clone_command.py b/edkrepo/commands/clone_command.py
index 2400272..701a853 100644
--- a/edkrepo/commands/clone_command.py
+++ b/edkrepo/commands/clone_command.py
@@ -3,7 +3,7 @@
## @file
# clone_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 #
@@ -16,7 +16,7 @@ import edkrepo.commands.arguments.clone_args as arguments from edkrepo.common.common_repo_functions import pull_latest_manifest_repo, clone_repos, sparse_checkout, verify_manifest_data from edkrepo.common.common_repo_functions import case_insensitive_single_match, update_editor_config from edkrepo.common.common_repo_functions import write_included_config, write_conditional_include -from edkrepo.common.common_repo_functions import find_project_in_index
+from edkrepo.common.common_repo_functions import find_project_in_index,
+combinations_in_manifest
from edkrepo.common.edkrepo_exception import EdkrepoInvalidParametersException, EdkrepoManifestInvalidException from edkrepo.common.humble import CLONE_INVALID_WORKSPACE, CLONE_INVALID_PROJECT_ARG, CLONE_INVALID_COMBO_ARG from edkrepo.common.humble import SPARSE_CHECKOUT, CLONE_INVALID_LOCAL_ROOTS @@ -99,7 +99,7 @@ class CloneCommand(EdkrepoCommand):
combo_name = None
if args.Combination is not None:
try:
- combo_name = case_insensitive_single_match(args.Combination, [x.name for x in manifest.combinations])
+ combo_name =
+ case_insensitive_single_match(args.Combination,
+ combinations_in_manifest(manifest))
except:
#remove the repo directory and Manifest.xml from the workspace so the next time the user trys to clone
#they will have an empty workspace and then raise an exception
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [edk2-staging/EdkRepo] [PATCH v1 7/7] EdkRepo: Update List Repos for archived combos
2020-03-31 22:41 [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos Bjorge, Erik C
` (5 preceding siblings ...)
2020-03-31 22:42 ` [edk2-staging/EdkRepo] [PATCH v1 6/7] EdkRepo: Update clone " Bjorge, Erik C
@ 2020-03-31 22:42 ` 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-03 22:27 ` Nate DeSimone
8 siblings, 1 reply; 18+ messages in thread
From: Bjorge, Erik C @ 2020-03-31 22:42 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya, Bret Barkelew, Prince Agyeman
When running the List Repos command archived combos will not be listed
unless the archived flag is provided.
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/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.<BR>
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -74,7 +74,10 @@ class ListReposCommand(EdkrepoCommand):
xml_file = ci_index_xml.get_project_xml(project)
manifest = ManifestXml(os.path.normpath(os.path.join(global_manifest_directory, xml_file)))
manifests[project] = manifest
- for combo in [c.name for c in manifest.combinations]:
+ combo_list = [c.name for c in manifest.combinations]
+ if args.archived:
+ combo_list.extend([c.name for c in manifest.archived_combinations])
+ for combo in combo_list:
sources = 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 = len(max(manifests.keys(), key=len))
#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)
#If the user provided a list of repositories to view, check to make sure
@@ -103,7 +106,10 @@ class ListReposCommand(EdkrepoCommand):
#Determine the list of branches that used by any branch combination in any manifest
branches = set()
for project_name in manifests:
- for combo in [c.name for c in manifests[project_name].combinations]:
+ combo_list = [c.name for c in manifests[project_name].combinations]
+ if args.archived:
+ combo_list.extend([c.name for c in manifests[project_name].archived_combinations])
+ for combo in combo_list:
sources = manifests[project_name].get_repo_sources(combo)
for source in sources:
if self.get_repo_url(source.remote_url) == repo:
@@ -124,7 +130,10 @@ class ListReposCommand(EdkrepoCommand):
#Determine the branch combinations that use that branch
for project_name in manifests:
combos = []
- for combo in [c.name for c in manifests[project_name].combinations]:
+ combo_list = [c.name for c in manifests[project_name].combinations]
+ if args.archived:
+ combo_list.extend([c.name for c in manifests[project_name].archived_combinations])
+ for combo in combo_list:
sources = manifests[project_name].get_repo_sources(combo)
for source in sources:
if self.get_repo_url(source.remote_url) == repo and source.branch == branch:
@@ -165,11 +174,11 @@ class ListReposCommand(EdkrepoCommand):
return name
raise EdkrepoInvalidParametersException(humble.REPO_NAME_NOT_FOUND)
- def generate_repo_names(self, repo_urls, manifests):
+ def generate_repo_names(self, repo_urls, manifests, archived=False):
#Determine the names of the repositories
self.repo_names = collections.OrderedDict()
for repo_url in repo_urls:
- self.__repo_name_worker(repo_url, manifests)
+ self.__repo_name_worker(repo_url, manifests, archived)
#Sort the git repositories so they will be displayed alphabetically
self.repo_names = 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)
- def __repo_name_worker(self, repo_url, manifests):
+ def __repo_name_worker(self, repo_url, manifests, archived=False):
#This is a heuristic that guesses the "name" of a repository by looking
#at the name given to it by the most manifest files.
names = collections.defaultdict(int)
for project_name in manifests:
- for combo in [c.name for c in manifests[project_name].combinations]:
+ combo_list = [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 = manifests[project_name].get_repo_sources(combo)
for source in sources:
if self.get_repo_url(source.remote_url) == repo_url:
@@ -209,7 +221,10 @@ class ListReposCommand(EdkrepoCommand):
#If only 1 project uses this name, then append the project
#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_name].combinations]:
+ combo_list = [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 = manifests[project_name].get_repo_sources(combo)
for source in sources:
if self.get_repo_url(source.remote_url) == repo_url and source.root == original_best_name:
@@ -239,7 +254,7 @@ class ListReposCommand(EdkrepoCommand):
del self.repo_names[best_name]
found_unique_name = True
self.repo_names[best_name] = (repo_url, best_name_frequency)
- self.__repo_name_worker(old_repo_url, manifests)
+ self.__repo_name_worker(old_repo_url, manifests, archived)
else:
#Use the name given by the second most manifest files
del names[best_name]
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 7/7] EdkRepo: Update List Repos for archived combos
2020-03-31 22:42 ` [edk2-staging/EdkRepo] [PATCH v1 7/7] EdkRepo: Update List Repos " Bjorge, Erik C
@ 2020-04-01 22:16 ` Desimone, Ashley E
0 siblings, 0 replies; 18+ messages in thread
From: Desimone, Ashley E @ 2020-04-01 22:16 UTC (permalink / raw)
To: devel@edk2.groups.io, Bjorge, Erik C
Cc: Desimone, Nathaniel L, Pandya, Puja, Bret Barkelew,
Agyeman, Prince
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 7/7] EdkRepo: Update List Repos for archived combos
When running the List Repos command archived combos will not be listed unless the archived flag is provided.
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/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.<BR>
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights
+reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent #
@@ -74,7 +74,10 @@ class ListReposCommand(EdkrepoCommand):
xml_file = ci_index_xml.get_project_xml(project)
manifest = ManifestXml(os.path.normpath(os.path.join(global_manifest_directory, xml_file)))
manifests[project] = manifest
- for combo in [c.name for c in manifest.combinations]:
+ combo_list = [c.name for c in manifest.combinations]
+ if args.archived:
+ combo_list.extend([c.name for c in manifest.archived_combinations])
+ for combo in combo_list:
sources = 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 = len(max(manifests.keys(), key=len))
#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)
#If the user provided a list of repositories to view, check to make sure @@ -103,7 +106,10 @@ class ListReposCommand(EdkrepoCommand):
#Determine the list of branches that used by any branch combination in any manifest
branches = set()
for project_name in manifests:
- for combo in [c.name for c in manifests[project_name].combinations]:
+ combo_list = [c.name for c in manifests[project_name].combinations]
+ if args.archived:
+ combo_list.extend([c.name for c in manifests[project_name].archived_combinations])
+ for combo in combo_list:
sources = manifests[project_name].get_repo_sources(combo)
for source in sources:
if self.get_repo_url(source.remote_url) == repo:
@@ -124,7 +130,10 @@ class ListReposCommand(EdkrepoCommand):
#Determine the branch combinations that use that branch
for project_name in manifests:
combos = []
- for combo in [c.name for c in manifests[project_name].combinations]:
+ combo_list = [c.name for c in manifests[project_name].combinations]
+ if args.archived:
+ combo_list.extend([c.name for c in manifests[project_name].archived_combinations])
+ for combo in combo_list:
sources = manifests[project_name].get_repo_sources(combo)
for source in sources:
if self.get_repo_url(source.remote_url) == repo and source.branch == branch:
@@ -165,11 +174,11 @@ class ListReposCommand(EdkrepoCommand):
return name
raise EdkrepoInvalidParametersException(humble.REPO_NAME_NOT_FOUND)
- def generate_repo_names(self, repo_urls, manifests):
+ def generate_repo_names(self, repo_urls, manifests, archived=False):
#Determine the names of the repositories
self.repo_names = collections.OrderedDict()
for repo_url in repo_urls:
- self.__repo_name_worker(repo_url, manifests)
+ self.__repo_name_worker(repo_url, manifests, archived)
#Sort the git repositories so they will be displayed alphabetically
self.repo_names = 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)
- def __repo_name_worker(self, repo_url, manifests):
+ def __repo_name_worker(self, repo_url, manifests, archived=False):
#This is a heuristic that guesses the "name" of a repository by looking
#at the name given to it by the most manifest files.
names = collections.defaultdict(int)
for project_name in manifests:
- for combo in [c.name for c in manifests[project_name].combinations]:
+ combo_list = [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 = manifests[project_name].get_repo_sources(combo)
for source in sources:
if self.get_repo_url(source.remote_url) == repo_url:
@@ -209,7 +221,10 @@ class ListReposCommand(EdkrepoCommand):
#If only 1 project uses this name, then append the project
#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_name].combinations]:
+ combo_list = [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 = manifests[project_name].get_repo_sources(combo)
for source in sources:
if self.get_repo_url(source.remote_url) == repo_url and source.root == original_best_name:
@@ -239,7 +254,7 @@ class ListReposCommand(EdkrepoCommand):
del self.repo_names[best_name]
found_unique_name = True
self.repo_names[best_name] = (repo_url, best_name_frequency)
- self.__repo_name_worker(old_repo_url, manifests)
+ self.__repo_name_worker(old_repo_url,
+ manifests, archived)
else:
#Use the name given by the second most manifest files
del names[best_name]
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos
2020-03-31 22:41 [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos Bjorge, Erik C
` (6 preceding siblings ...)
2020-03-31 22:42 ` [edk2-staging/EdkRepo] [PATCH v1 7/7] EdkRepo: Update List Repos " Bjorge, Erik C
@ 2020-04-02 5:59 ` Nate DeSimone
2020-04-02 17:02 ` Bjorge, Erik C
2020-04-03 22:27 ` Nate DeSimone
8 siblings, 1 reply; 18+ messages in thread
From: Nate DeSimone @ 2020-04-02 5:59 UTC (permalink / raw)
To: devel@edk2.groups.io, Bjorge, Erik C
Cc: Desimone, Ashley E, Pandya, Puja, Bret Barkelew, Agyeman, Prince
Erik,
Please remember to Cc: the reviewers on the cover letter as well next time.
For the series...
Reviewed-by: Nate DeSimone <nathaniel.l.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
Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos
Adding the ability to mark a branch combination as archived. This will remove it from the list of valid combinations by default. It should not limit users from accessing the branch combination. The archive flag will allow users to list archived branch combinations in the combo command.
Erik Bjorge (7):
EdkRepo: Adding support for archiving combos
EdkRepo: Added ability to display archived combinations
EdkRepo: Update Checkout for archived combos
EdkRepo: Update Sync for archived combos
EdkRepo: Update Checkout Pin for archived combos
EdkRepo: Update clone for archived combos
EdkRepo: Update List Repos for archived combos
edkrepo/commands/arguments/combo_args.py | 5 ++-- edkrepo/commands/checkout_pin_command.py | 4 +--
edkrepo/commands/clone_command.py | 6 ++--
edkrepo/commands/combo_command.py | 19 ++++++++++--
edkrepo/commands/list_repos_command.py | 37 +++++++++++++++++-------
edkrepo/commands/sync_command.py | 16 +++++-----
edkrepo/common/common_repo_functions.py | 10 +++++-- edkrepo_manifest_parser/edk_manifest.py | 10 ++++++-
8 files changed, 76 insertions(+), 31 deletions(-)
--
2.21.0.windows.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos
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
0 siblings, 0 replies; 18+ messages in thread
From: Bjorge, Erik C @ 2020-04-02 17:02 UTC (permalink / raw)
To: Desimone, Nathaniel L, devel@edk2.groups.io
Cc: Desimone, Ashley E, Pandya, Puja, Bret Barkelew, Agyeman, Prince
I will fix it next time.
-Erik
-----Original Message-----
From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
Sent: Wednesday, April 1, 2020 10:59 PM
To: devel@edk2.groups.io; Bjorge, Erik C <erik.c.bjorge@intel.com>
Cc: Desimone, Ashley E <ashley.e.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 0/7] Adding support for archiving branch combos
Erik,
Please remember to Cc: the reviewers on the cover letter as well next time.
For the series...
Reviewed-by: Nate DeSimone <nathaniel.l.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
Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos
Adding the ability to mark a branch combination as archived. This will remove it from the list of valid combinations by default. It should not limit users from accessing the branch combination. The archive flag will allow users to list archived branch combinations in the combo command.
Erik Bjorge (7):
EdkRepo: Adding support for archiving combos
EdkRepo: Added ability to display archived combinations
EdkRepo: Update Checkout for archived combos
EdkRepo: Update Sync for archived combos
EdkRepo: Update Checkout Pin for archived combos
EdkRepo: Update clone for archived combos
EdkRepo: Update List Repos for archived combos
edkrepo/commands/arguments/combo_args.py | 5 ++-- edkrepo/commands/checkout_pin_command.py | 4 +--
edkrepo/commands/clone_command.py | 6 ++--
edkrepo/commands/combo_command.py | 19 ++++++++++--
edkrepo/commands/list_repos_command.py | 37 +++++++++++++++++-------
edkrepo/commands/sync_command.py | 16 +++++-----
edkrepo/common/common_repo_functions.py | 10 +++++-- edkrepo_manifest_parser/edk_manifest.py | 10 ++++++-
8 files changed, 76 insertions(+), 31 deletions(-)
--
2.21.0.windows.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos
2020-03-31 22:41 [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos Bjorge, Erik C
` (7 preceding siblings ...)
2020-04-02 5:59 ` [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos Nate DeSimone
@ 2020-04-03 22:27 ` Nate DeSimone
8 siblings, 0 replies; 18+ messages in thread
From: Nate DeSimone @ 2020-04-03 22:27 UTC (permalink / raw)
To: devel@edk2.groups.io, Bjorge, Erik C
Cc: Desimone, Ashley E, Pandya, Puja, Bret Barkelew, Agyeman, Prince
Pushed: https://github.com/tianocore/edk2-staging/compare/d1cc427f...eaa400ac
-----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
Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos
Adding the ability to mark a branch combination as archived. This will remove it from the list of valid combinations by default. It should not limit users from accessing the branch combination. The archive flag will allow users to list archived branch combinations in the combo command.
Erik Bjorge (7):
EdkRepo: Adding support for archiving combos
EdkRepo: Added ability to display archived combinations
EdkRepo: Update Checkout for archived combos
EdkRepo: Update Sync for archived combos
EdkRepo: Update Checkout Pin for archived combos
EdkRepo: Update clone for archived combos
EdkRepo: Update List Repos for archived combos
edkrepo/commands/arguments/combo_args.py | 5 ++-- edkrepo/commands/checkout_pin_command.py | 4 +--
edkrepo/commands/clone_command.py | 6 ++--
edkrepo/commands/combo_command.py | 19 ++++++++++--
edkrepo/commands/list_repos_command.py | 37 +++++++++++++++++-------
edkrepo/commands/sync_command.py | 16 +++++-----
edkrepo/common/common_repo_functions.py | 10 +++++-- edkrepo_manifest_parser/edk_manifest.py | 10 ++++++-
8 files changed, 76 insertions(+), 31 deletions(-)
--
2.21.0.windows.1
^ permalink raw reply [flat|nested] 18+ messages in thread