* [edk2-devel][edk2-staging/EdkRepo][PATCH v2 2/8] EdkRepo: Argument String Refactor Manifest Command
2019-11-06 22:39 [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Desimone, Ashley E
@ 2019-11-06 22:39 ` Desimone, Ashley E
2019-11-06 22:44 ` Nate DeSimone
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 3/8] EdkRepo: Argument String Refactor - Combo Command Desimone, Ashley E
` (6 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Desimone, Ashley E @ 2019-11-06 22:39 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya
Update setup.py to add edkrepo.commands.arguments.
Move all argument strings for manifest_command.py to
edkrepo/commands/arguments/manifest_args.py and remove
unused strings.
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/commands/arguments/__init__.py | 8 ++++++++
edkrepo/commands/arguments/manifest_args.py | 15 +++++++++++++++
edkrepo/commands/manifest_command.py | 7 +++----
edkrepo/common/argument_strings.py | 5 -----
setup.py | 2 +-
5 files changed, 27 insertions(+), 10 deletions(-)
create mode 100644 edkrepo/commands/arguments/__init__.py
create mode 100644 edkrepo/commands/arguments/manifest_args.py
diff --git a/edkrepo/commands/arguments/__init__.py b/edkrepo/commands/arguments/__init__.py
new file mode 100644
index 0000000..dea6eb4
--- /dev/null
+++ b/edkrepo/commands/arguments/__init__.py
@@ -0,0 +1,8 @@
+#!/usr/bin/env python3
+#
+## @file
+# __init__.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
diff --git a/edkrepo/commands/arguments/manifest_args.py b/edkrepo/commands/arguments/manifest_args.py
new file mode 100644
index 0000000..25b9773
--- /dev/null
+++ b/edkrepo/commands/arguments/manifest_args.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+#
+## @file
+# manifest_args.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+''' Contains the help and description strings for arguments in the
+manifest command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Lists the available projects.'
+ARCHIVED_HELP = 'Include a listing of archived projects.'
\ No newline at end of file
diff --git a/edkrepo/commands/manifest_command.py b/edkrepo/commands/manifest_command.py
index 32cac7f..44218c9 100644
--- a/edkrepo/commands/manifest_command.py
+++ b/edkrepo/commands/manifest_command.py
@@ -12,11 +12,10 @@ import os
from colorama import Fore
-# Our modules
from edkrepo.commands.edkrepo_command import EdkrepoCommand
from edkrepo.commands.edkrepo_command import ColorArgument
+import edkrepo.commands.arguments.manifest_args as arguments
from edkrepo.common.edkrepo_exception import EdkrepoWorkspaceInvalidException
-from edkrepo.common.argument_strings import MANIFEST_COMMAND_DESCRIPTION, ARCHIVED_HELP, MANIFEST_VERBOSE_HELP
from edkrepo.common.common_repo_functions import pull_latest_manifest_repo, verify_manifest_data
from edkrepo.common.ui_functions import init_color_console
from edkrepo.config.config_factory import get_workspace_manifest
@@ -30,14 +29,14 @@ class ManifestCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'manifest'
- metadata['help-text'] = MANIFEST_COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append({'name': 'archived',
'short-name': 'a',
'positional': False,
'required': False,
- 'help-text': ARCHIVED_HELP})
+ 'help-text': arguments.ARCHIVED_HELP})
args.append(ColorArgument)
return metadata
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index 93db079..fd74f37 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -41,11 +41,6 @@ UPDATE_LOCAL_MANIFEST_DESCRIPTION = 'Updates the global manifest repository and
UPDATE_LOCAL_MANIFEST_HELP = 'Updates the local manifest file found in the <workspace>/repo directory prior to performing sync operations.'
SYNC_OVERRIDE_HELP = 'Without this flag sync operations will not be completed if the updated manifest adds/removes repositories or if there are local commits on the target branch.'
-#Args for manifest_command.py
-MANIFEST_COMMAND_DESCRIPTION = 'Lists project manifests'
-ARCHIVED_HELP = 'Include archived projects'
-MANIFEST_VERBOSE_HELP = 'Show XML path'
-
#Args for checkout_command.py
CHECKOUT_COMMAND_DESCRIPTION = 'The checkout command enables checking out a specific branch combination from the project manifest located in the <workspace>/repo directory or the sha of a specific commit which will update all repos in the workspace to this commit.\nNote that checkout SHA will put the affected repos into detached head mode.\n'
CHECKOUT_COMBINATION_DESCRIPTION = 'EdkRepo checkout <Combination or sha>\n'
diff --git a/setup.py b/setup.py
index ed07594..4be04f1 100755
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ from setuptools import setup
setup(name='edkrepo',
version='2.0.0',
description='The edkrepo tools',
- packages=['edkrepo', 'edkrepo.commands', 'edkrepo.common', 'edkrepo.config', 'edkrepo_manifest_parser', 'project_utils'],
+ packages=['edkrepo', 'edkrepo.commands', 'edkrepo.commands.arguments', 'edkrepo.common', 'edkrepo.config', 'edkrepo_manifest_parser', 'project_utils'],
package_data={
},
include_package_data=True,
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 2/8] EdkRepo: Argument String Refactor Manifest Command
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 2/8] EdkRepo: Argument String Refactor Manifest Command Desimone, Ashley E
@ 2019-11-06 22:44 ` Nate DeSimone
0 siblings, 0 replies; 16+ messages in thread
From: Nate DeSimone @ 2019-11-06 22:44 UTC (permalink / raw)
To: Desimone, Ashley E, devel@edk2.groups.io; +Cc: Pandya, Puja
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: Desimone, Ashley E <ashley.e.desimone@intel.com>
Sent: Wednesday, November 6, 2019 2:40 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>
Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 2/8] EdkRepo: Argument String Refactor Manifest Command
Update setup.py to add edkrepo.commands.arguments.
Move all argument strings for manifest_command.py to edkrepo/commands/arguments/manifest_args.py and remove unused strings.
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/commands/arguments/__init__.py | 8 ++++++++
edkrepo/commands/arguments/manifest_args.py | 15 +++++++++++++++
edkrepo/commands/manifest_command.py | 7 +++----
edkrepo/common/argument_strings.py | 5 -----
setup.py | 2 +-
5 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 edkrepo/commands/arguments/__init__.py
create mode 100644 edkrepo/commands/arguments/manifest_args.py
diff --git a/edkrepo/commands/arguments/__init__.py b/edkrepo/commands/arguments/__init__.py
new file mode 100644
index 0000000..dea6eb4
--- /dev/null
+++ b/edkrepo/commands/arguments/__init__.py
@@ -0,0 +1,8 @@
+#!/usr/bin/env python3
+#
+## @file
+# __init__.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> #
+SPDX-License-Identifier: BSD-2-Clause-Patent #
diff --git a/edkrepo/commands/arguments/manifest_args.py b/edkrepo/commands/arguments/manifest_args.py
new file mode 100644
index 0000000..25b9773
--- /dev/null
+++ b/edkrepo/commands/arguments/manifest_args.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+#
+## @file
+# manifest_args.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> #
+SPDX-License-Identifier: BSD-2-Clause-Patent #
+
+''' Contains the help and description strings for arguments in the
+manifest command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Lists the available projects.'
+ARCHIVED_HELP = 'Include a listing of archived projects.'
\ No newline at end of file
diff --git a/edkrepo/commands/manifest_command.py b/edkrepo/commands/manifest_command.py
index 32cac7f..44218c9 100644
--- a/edkrepo/commands/manifest_command.py
+++ b/edkrepo/commands/manifest_command.py
@@ -12,11 +12,10 @@ import os
from colorama import Fore
-# Our modules
from edkrepo.commands.edkrepo_command import EdkrepoCommand from edkrepo.commands.edkrepo_command import ColorArgument
+import edkrepo.commands.arguments.manifest_args as arguments
from edkrepo.common.edkrepo_exception import EdkrepoWorkspaceInvalidException -from edkrepo.common.argument_strings import MANIFEST_COMMAND_DESCRIPTION, ARCHIVED_HELP, MANIFEST_VERBOSE_HELP from edkrepo.common.common_repo_functions import pull_latest_manifest_repo, verify_manifest_data from edkrepo.common.ui_functions import init_color_console from edkrepo.config.config_factory import get_workspace_manifest @@ -30,14 +29,14 @@ class ManifestCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'manifest'
- metadata['help-text'] = MANIFEST_COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append({'name': 'archived',
'short-name': 'a',
'positional': False,
'required': False,
- 'help-text': ARCHIVED_HELP})
+ 'help-text': arguments.ARCHIVED_HELP})
args.append(ColorArgument)
return metadata
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index 93db079..fd74f37 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -41,11 +41,6 @@ UPDATE_LOCAL_MANIFEST_DESCRIPTION = 'Updates the global manifest repository and UPDATE_LOCAL_MANIFEST_HELP = 'Updates the local manifest file found in the <workspace>/repo directory prior to performing sync operations.'
SYNC_OVERRIDE_HELP = 'Without this flag sync operations will not be completed if the updated manifest adds/removes repositories or if there are local commits on the target branch.'
-#Args for manifest_command.py
-MANIFEST_COMMAND_DESCRIPTION = 'Lists project manifests'
-ARCHIVED_HELP = 'Include archived projects'
-MANIFEST_VERBOSE_HELP = 'Show XML path'
-
#Args for checkout_command.py
CHECKOUT_COMMAND_DESCRIPTION = 'The checkout command enables checking out a specific branch combination from the project manifest located in the <workspace>/repo directory or the sha of a specific commit which will update all repos in the workspace to this commit.\nNote that checkout SHA will put the affected repos into detached head mode.\n'
CHECKOUT_COMBINATION_DESCRIPTION = 'EdkRepo checkout <Combination or sha>\n'
diff --git a/setup.py b/setup.py
index ed07594..4be04f1 100755
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ from setuptools import setup setup(name='edkrepo',
version='2.0.0',
description='The edkrepo tools',
- packages=['edkrepo', 'edkrepo.commands', 'edkrepo.common', 'edkrepo.config', 'edkrepo_manifest_parser', 'project_utils'],
+ packages=['edkrepo', 'edkrepo.commands',
+ 'edkrepo.commands.arguments', 'edkrepo.common', 'edkrepo.config',
+ 'edkrepo_manifest_parser', 'project_utils'],
package_data={
},
include_package_data=True,
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [edk2-devel][edk2-staging/EdkRepo][PATCH v2 3/8] EdkRepo: Argument String Refactor - Combo Command
2019-11-06 22:39 [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Desimone, Ashley E
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 2/8] EdkRepo: Argument String Refactor Manifest Command Desimone, Ashley E
@ 2019-11-06 22:39 ` Desimone, Ashley E
2019-11-06 22:44 ` Nate DeSimone
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 4/8] EdkRepo: Argument String Refactor - Checkout Command Desimone, Ashley E
` (5 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Desimone, Ashley E @ 2019-11-06 22:39 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya
Move all argumenet strings for combo_command.py to
edkrepo/commands/arguments/combo_args.py
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/commands/arguments/combo_args.py | 14 ++++++++++++++
edkrepo/commands/combo_command.py | 5 ++---
edkrepo/common/argument_strings.py | 3 ---
3 files changed, 16 insertions(+), 6 deletions(-)
create mode 100644 edkrepo/commands/arguments/combo_args.py
diff --git a/edkrepo/commands/arguments/combo_args.py b/edkrepo/commands/arguments/combo_args.py
new file mode 100644
index 0000000..bcb5d37
--- /dev/null
+++ b/edkrepo/commands/arguments/combo_args.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+#
+## @file
+# combo_args.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+''' Contains the help and description strings for arguments in the
+combo command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Displays the currently checked out combination and lists all available combinations.'
\ No newline at end of file
diff --git a/edkrepo/commands/combo_command.py b/edkrepo/commands/combo_command.py
index 3c456c2..68d6854 100644
--- a/edkrepo/commands/combo_command.py
+++ b/edkrepo/commands/combo_command.py
@@ -8,10 +8,9 @@
#
from colorama import Fore
-# Our modules
from edkrepo.commands.edkrepo_command import EdkrepoCommand
from edkrepo.commands.edkrepo_command import ColorArgument
-from edkrepo.common.argument_strings import COMBO_COMMAND_DESCRIPTION
+import edkrepo.commands.arguments.combo_args as arguments
from edkrepo.common.ui_functions import init_color_console
from edkrepo.config.config_factory import get_workspace_manifest
@@ -23,7 +22,7 @@ class ComboCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'combo'
- metadata['help-text'] = COMBO_COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append(ColorArgument)
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index fd74f37..e42d5b1 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -46,9 +46,6 @@ CHECKOUT_COMMAND_DESCRIPTION = 'The checkout command enables checking out a spec
CHECKOUT_COMBINATION_DESCRIPTION = 'EdkRepo checkout <Combination or sha>\n'
CHECKOUT_COMBINATION_HELP = 'Combination: The name of the combination as defined in the workspace manifest file to checkout or the sha of the revision to checkout\n'
-#Args for combos_command.py
-COMBO_COMMAND_DESCRIPTION = 'Displays the list of combinations and the currently checked out combination'
-
#Args for sparse_command.py
SPARSE_COMMAND_DESCRIPTION = 'Displays the current sparse checkout status and allows for changing the sparse checkout state.'
SPARSE_ENABLE_HELP = 'Enables sparse checkout if supported by the manifest.'
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 3/8] EdkRepo: Argument String Refactor - Combo Command
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 3/8] EdkRepo: Argument String Refactor - Combo Command Desimone, Ashley E
@ 2019-11-06 22:44 ` Nate DeSimone
0 siblings, 0 replies; 16+ messages in thread
From: Nate DeSimone @ 2019-11-06 22:44 UTC (permalink / raw)
To: Desimone, Ashley E, devel@edk2.groups.io; +Cc: Pandya, Puja
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: Desimone, Ashley E <ashley.e.desimone@intel.com>
Sent: Wednesday, November 6, 2019 2:40 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>
Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 3/8] EdkRepo: Argument String Refactor - Combo Command
Move all argumenet strings for combo_command.py to edkrepo/commands/arguments/combo_args.py
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/commands/arguments/combo_args.py | 14 ++++++++++++++
edkrepo/commands/combo_command.py | 5 ++---
edkrepo/common/argument_strings.py | 3 ---
3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 edkrepo/commands/arguments/combo_args.py
diff --git a/edkrepo/commands/arguments/combo_args.py b/edkrepo/commands/arguments/combo_args.py
new file mode 100644
index 0000000..bcb5d37
--- /dev/null
+++ b/edkrepo/commands/arguments/combo_args.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+#
+## @file
+# combo_args.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> #
+SPDX-License-Identifier: BSD-2-Clause-Patent #
+
+''' Contains the help and description strings for arguments in the
+combo command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Displays the currently checked out combination and lists all available combinations.'
\ No newline at end of file
diff --git a/edkrepo/commands/combo_command.py b/edkrepo/commands/combo_command.py
index 3c456c2..68d6854 100644
--- a/edkrepo/commands/combo_command.py
+++ b/edkrepo/commands/combo_command.py
@@ -8,10 +8,9 @@
#
from colorama import Fore
-# Our modules
from edkrepo.commands.edkrepo_command import EdkrepoCommand from edkrepo.commands.edkrepo_command import ColorArgument -from edkrepo.common.argument_strings import COMBO_COMMAND_DESCRIPTION
+import edkrepo.commands.arguments.combo_args as arguments
from edkrepo.common.ui_functions import init_color_console from edkrepo.config.config_factory import get_workspace_manifest
@@ -23,7 +22,7 @@ class ComboCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'combo'
- metadata['help-text'] = COMBO_COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append(ColorArgument)
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index fd74f37..e42d5b1 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -46,9 +46,6 @@ CHECKOUT_COMMAND_DESCRIPTION = 'The checkout command enables checking out a spec CHECKOUT_COMBINATION_DESCRIPTION = 'EdkRepo checkout <Combination or sha>\n'
CHECKOUT_COMBINATION_HELP = 'Combination: The name of the combination as defined in the workspace manifest file to checkout or the sha of the revision to checkout\n'
-#Args for combos_command.py
-COMBO_COMMAND_DESCRIPTION = 'Displays the list of combinations and the currently checked out combination'
-
#Args for sparse_command.py
SPARSE_COMMAND_DESCRIPTION = 'Displays the current sparse checkout status and allows for changing the sparse checkout state.'
SPARSE_ENABLE_HELP = 'Enables sparse checkout if supported by the manifest.'
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [edk2-devel][edk2-staging/EdkRepo][PATCH v2 4/8] EdkRepo: Argument String Refactor - Checkout Command
2019-11-06 22:39 [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Desimone, Ashley E
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 2/8] EdkRepo: Argument String Refactor Manifest Command Desimone, Ashley E
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 3/8] EdkRepo: Argument String Refactor - Combo Command Desimone, Ashley E
@ 2019-11-06 22:39 ` Desimone, Ashley E
2019-11-06 22:44 ` Nate DeSimone
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 5/8] EdkRepo: Argument Strings Refactor - Sparse Command Desimone, Ashley E
` (4 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Desimone, Ashley E @ 2019-11-06 22:39 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya
Move all argument strings for checkout_command.py to
edkrepo/commands/arguments/checkout_args.py
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/commands/arguments/checkout_args.py | 16 ++++++++++++++++
edkrepo/commands/checkout_command.py | 10 ++++------
edkrepo/common/argument_strings.py | 5 -----
3 files changed, 20 insertions(+), 11 deletions(-)
create mode 100644 edkrepo/commands/arguments/checkout_args.py
diff --git a/edkrepo/commands/arguments/checkout_args.py b/edkrepo/commands/arguments/checkout_args.py
new file mode 100644
index 0000000..6c8841e
--- /dev/null
+++ b/edkrepo/commands/arguments/checkout_args.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3
+#
+## @file
+# checkout_args.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+''' Contains the help and description strings for arguments in the
+checkout command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Enables checking out a specific branch combination defined in the project manifest file.'
+COMBINATION_DESCRIPTION = 'edkrepo checkout <combination>'
+COMBINATION_HELP = 'The name of the branch combination to checkout as defined in the project manifest file.'
\ No newline at end of file
diff --git a/edkrepo/commands/checkout_command.py b/edkrepo/commands/checkout_command.py
index fe8ba0b..2ae52be 100644
--- a/edkrepo/commands/checkout_command.py
+++ b/edkrepo/commands/checkout_command.py
@@ -14,9 +14,7 @@ import os
# Our modules
from edkrepo.commands.edkrepo_command import EdkrepoCommand, OverrideArgument
-from edkrepo.common.argument_strings import CHECKOUT_COMMAND_DESCRIPTION
-from edkrepo.common.argument_strings import CHECKOUT_COMBINATION_DESCRIPTION
-from edkrepo.common.argument_strings import CHECKOUT_COMBINATION_HELP
+import edkrepo.commands.arguments.checkout_args as arguments
from edkrepo.common.common_repo_functions import checkout
@@ -27,15 +25,15 @@ class CheckoutCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'checkout'
- metadata['help-text'] = CHECKOUT_COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append({'name' : 'Combination',
'positional' : True,
'position' : 0,
'required': True,
- 'description' : CHECKOUT_COMBINATION_DESCRIPTION,
- 'help-text' : CHECKOUT_COMBINATION_HELP})
+ 'description' : arguments.COMBINATION_DESCRIPTION,
+ 'help-text' : arguments.COMBINATION_HELP})
args.append(OverrideArgument)
return metadata
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index e42d5b1..e5146df 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -41,11 +41,6 @@ UPDATE_LOCAL_MANIFEST_DESCRIPTION = 'Updates the global manifest repository and
UPDATE_LOCAL_MANIFEST_HELP = 'Updates the local manifest file found in the <workspace>/repo directory prior to performing sync operations.'
SYNC_OVERRIDE_HELP = 'Without this flag sync operations will not be completed if the updated manifest adds/removes repositories or if there are local commits on the target branch.'
-#Args for checkout_command.py
-CHECKOUT_COMMAND_DESCRIPTION = 'The checkout command enables checking out a specific branch combination from the project manifest located in the <workspace>/repo directory or the sha of a specific commit which will update all repos in the workspace to this commit.\nNote that checkout SHA will put the affected repos into detached head mode.\n'
-CHECKOUT_COMBINATION_DESCRIPTION = 'EdkRepo checkout <Combination or sha>\n'
-CHECKOUT_COMBINATION_HELP = 'Combination: The name of the combination as defined in the workspace manifest file to checkout or the sha of the revision to checkout\n'
-
#Args for sparse_command.py
SPARSE_COMMAND_DESCRIPTION = 'Displays the current sparse checkout status and allows for changing the sparse checkout state.'
SPARSE_ENABLE_HELP = 'Enables sparse checkout if supported by the manifest.'
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 4/8] EdkRepo: Argument String Refactor - Checkout Command
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 4/8] EdkRepo: Argument String Refactor - Checkout Command Desimone, Ashley E
@ 2019-11-06 22:44 ` Nate DeSimone
0 siblings, 0 replies; 16+ messages in thread
From: Nate DeSimone @ 2019-11-06 22:44 UTC (permalink / raw)
To: Desimone, Ashley E, devel@edk2.groups.io; +Cc: Pandya, Puja
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: Desimone, Ashley E <ashley.e.desimone@intel.com>
Sent: Wednesday, November 6, 2019 2:40 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>
Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 4/8] EdkRepo: Argument String Refactor - Checkout Command
Move all argument strings for checkout_command.py to edkrepo/commands/arguments/checkout_args.py
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/commands/arguments/checkout_args.py | 16 ++++++++++++++++
edkrepo/commands/checkout_command.py | 10 ++++------
edkrepo/common/argument_strings.py | 5 -----
3 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 edkrepo/commands/arguments/checkout_args.py
diff --git a/edkrepo/commands/arguments/checkout_args.py b/edkrepo/commands/arguments/checkout_args.py
new file mode 100644
index 0000000..6c8841e
--- /dev/null
+++ b/edkrepo/commands/arguments/checkout_args.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3
+#
+## @file
+# checkout_args.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> #
+SPDX-License-Identifier: BSD-2-Clause-Patent #
+
+''' Contains the help and description strings for arguments in the
+checkout command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Enables checking out a specific branch combination defined in the project manifest file.'
+COMBINATION_DESCRIPTION = 'edkrepo checkout <combination>'
+COMBINATION_HELP = 'The name of the branch combination to checkout as defined in the project manifest file.'
\ No newline at end of file
diff --git a/edkrepo/commands/checkout_command.py b/edkrepo/commands/checkout_command.py
index fe8ba0b..2ae52be 100644
--- a/edkrepo/commands/checkout_command.py
+++ b/edkrepo/commands/checkout_command.py
@@ -14,9 +14,7 @@ import os
# Our modules
from edkrepo.commands.edkrepo_command import EdkrepoCommand, OverrideArgument -from edkrepo.common.argument_strings import CHECKOUT_COMMAND_DESCRIPTION -from edkrepo.common.argument_strings import CHECKOUT_COMBINATION_DESCRIPTION -from edkrepo.common.argument_strings import CHECKOUT_COMBINATION_HELP
+import edkrepo.commands.arguments.checkout_args as arguments
from edkrepo.common.common_repo_functions import checkout
@@ -27,15 +25,15 @@ class CheckoutCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'checkout'
- metadata['help-text'] = CHECKOUT_COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append({'name' : 'Combination',
'positional' : True,
'position' : 0,
'required': True,
- 'description' : CHECKOUT_COMBINATION_DESCRIPTION,
- 'help-text' : CHECKOUT_COMBINATION_HELP})
+ 'description' : arguments.COMBINATION_DESCRIPTION,
+ 'help-text' : arguments.COMBINATION_HELP})
args.append(OverrideArgument)
return metadata
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index e42d5b1..e5146df 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -41,11 +41,6 @@ UPDATE_LOCAL_MANIFEST_DESCRIPTION = 'Updates the global manifest repository and UPDATE_LOCAL_MANIFEST_HELP = 'Updates the local manifest file found in the <workspace>/repo directory prior to performing sync operations.'
SYNC_OVERRIDE_HELP = 'Without this flag sync operations will not be completed if the updated manifest adds/removes repositories or if there are local commits on the target branch.'
-#Args for checkout_command.py
-CHECKOUT_COMMAND_DESCRIPTION = 'The checkout command enables checking out a specific branch combination from the project manifest located in the <workspace>/repo directory or the sha of a specific commit which will update all repos in the workspace to this commit.\nNote that checkout SHA will put the affected repos into detached head mode.\n'
-CHECKOUT_COMBINATION_DESCRIPTION = 'EdkRepo checkout <Combination or sha>\n'
-CHECKOUT_COMBINATION_HELP = 'Combination: The name of the combination as defined in the workspace manifest file to checkout or the sha of the revision to checkout\n'
-
#Args for sparse_command.py
SPARSE_COMMAND_DESCRIPTION = 'Displays the current sparse checkout status and allows for changing the sparse checkout state.'
SPARSE_ENABLE_HELP = 'Enables sparse checkout if supported by the manifest.'
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [edk2-devel][edk2-staging/EdkRepo][PATCH v2 5/8] EdkRepo: Argument Strings Refactor - Sparse Command
2019-11-06 22:39 [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Desimone, Ashley E
` (2 preceding siblings ...)
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 4/8] EdkRepo: Argument String Refactor - Checkout Command Desimone, Ashley E
@ 2019-11-06 22:39 ` Desimone, Ashley E
2019-11-06 22:44 ` Nate DeSimone
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 6/8] EdkRepo: Argument Strings Refactor - Sync Command Desimone, Ashley E
` (3 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Desimone, Ashley E @ 2019-11-06 22:39 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya
Move all argument strings for sparse_command.py to
edkrepo/commands/arguments/sparse_args.py
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/commands/arguments/sparse_args.py | 16 ++++++++++++++++
edkrepo/commands/sparse_command.py | 8 ++++----
edkrepo/common/argument_strings.py | 4 ----
3 files changed, 20 insertions(+), 8 deletions(-)
create mode 100644 edkrepo/commands/arguments/sparse_args.py
diff --git a/edkrepo/commands/arguments/sparse_args.py b/edkrepo/commands/arguments/sparse_args.py
new file mode 100644
index 0000000..167334c
--- /dev/null
+++ b/edkrepo/commands/arguments/sparse_args.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3
+#
+## @file
+# sparse_args.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+''' Contains the help and description strings for arguments in the
+sparse command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Displays the current sparse checkout status and enables changing the sparse checkout state.'
+ENABLE_HELP = 'Enables sparse checkout if supported in the project manifest file.'
+DISABLE_HELP = 'Disables sparse checkout if it is currently enabled.'
\ No newline at end of file
diff --git a/edkrepo/commands/sparse_command.py b/edkrepo/commands/sparse_command.py
index a20bd89..5d4ef90 100644
--- a/edkrepo/commands/sparse_command.py
+++ b/edkrepo/commands/sparse_command.py
@@ -8,7 +8,7 @@
#
from edkrepo.commands.edkrepo_command import EdkrepoCommand
-from edkrepo.common.argument_strings import SPARSE_COMMAND_DESCRIPTION, SPARSE_ENABLE_HELP, SPARSE_DISABLE_HELP
+import edkrepo.commands.arguments.sparse_args as arguments
from edkrepo.config.config_factory import get_workspace_path, get_workspace_manifest
from edkrepo.common.common_repo_functions import sparse_checkout_enabled, sparse_checkout, reset_sparse_checkout
from edkrepo.common.common_repo_functions import check_dirty_repos
@@ -24,17 +24,17 @@ class SparseCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'sparse'
- metadata['help-text'] = SPARSE_COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append({'name': 'enable',
'positional': False,
'required': False,
- 'help-text': SPARSE_ENABLE_HELP})
+ 'help-text': arguments.ENABLE_HELP})
args.append({'name': 'disable',
'positional': False,
'required': False,
- 'help-text': SPARSE_DISABLE_HELP})
+ 'help-text': arguments.DISABLE_HELP})
return metadata
def run_command(self, args, config):
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index e5146df..50e25ee 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -41,7 +41,3 @@ UPDATE_LOCAL_MANIFEST_DESCRIPTION = 'Updates the global manifest repository and
UPDATE_LOCAL_MANIFEST_HELP = 'Updates the local manifest file found in the <workspace>/repo directory prior to performing sync operations.'
SYNC_OVERRIDE_HELP = 'Without this flag sync operations will not be completed if the updated manifest adds/removes repositories or if there are local commits on the target branch.'
-#Args for sparse_command.py
-SPARSE_COMMAND_DESCRIPTION = 'Displays the current sparse checkout status and allows for changing the sparse checkout state.'
-SPARSE_ENABLE_HELP = 'Enables sparse checkout if supported by the manifest.'
-SPARSE_DISABLE_HELP = 'Disables sparse checkout if enabled.'
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 5/8] EdkRepo: Argument Strings Refactor - Sparse Command
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 5/8] EdkRepo: Argument Strings Refactor - Sparse Command Desimone, Ashley E
@ 2019-11-06 22:44 ` Nate DeSimone
0 siblings, 0 replies; 16+ messages in thread
From: Nate DeSimone @ 2019-11-06 22:44 UTC (permalink / raw)
To: Desimone, Ashley E, devel@edk2.groups.io; +Cc: Pandya, Puja
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: Desimone, Ashley E <ashley.e.desimone@intel.com>
Sent: Wednesday, November 6, 2019 2:40 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>
Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 5/8] EdkRepo: Argument Strings Refactor - Sparse Command
Move all argument strings for sparse_command.py to edkrepo/commands/arguments/sparse_args.py
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/commands/arguments/sparse_args.py | 16 ++++++++++++++++
edkrepo/commands/sparse_command.py | 8 ++++----
edkrepo/common/argument_strings.py | 4 ----
3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 edkrepo/commands/arguments/sparse_args.py
diff --git a/edkrepo/commands/arguments/sparse_args.py b/edkrepo/commands/arguments/sparse_args.py
new file mode 100644
index 0000000..167334c
--- /dev/null
+++ b/edkrepo/commands/arguments/sparse_args.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3
+#
+## @file
+# sparse_args.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> #
+SPDX-License-Identifier: BSD-2-Clause-Patent #
+
+''' Contains the help and description strings for arguments in the
+sparse command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Displays the current sparse checkout status and enables changing the sparse checkout state.'
+ENABLE_HELP = 'Enables sparse checkout if supported in the project manifest file.'
+DISABLE_HELP = 'Disables sparse checkout if it is currently enabled.'
\ No newline at end of file
diff --git a/edkrepo/commands/sparse_command.py b/edkrepo/commands/sparse_command.py
index a20bd89..5d4ef90 100644
--- a/edkrepo/commands/sparse_command.py
+++ b/edkrepo/commands/sparse_command.py
@@ -8,7 +8,7 @@
#
from edkrepo.commands.edkrepo_command import EdkrepoCommand -from edkrepo.common.argument_strings import SPARSE_COMMAND_DESCRIPTION, SPARSE_ENABLE_HELP, SPARSE_DISABLE_HELP
+import edkrepo.commands.arguments.sparse_args as arguments
from edkrepo.config.config_factory import get_workspace_path, get_workspace_manifest from edkrepo.common.common_repo_functions import sparse_checkout_enabled, sparse_checkout, reset_sparse_checkout from edkrepo.common.common_repo_functions import check_dirty_repos @@ -24,17 +24,17 @@ class SparseCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'sparse'
- metadata['help-text'] = SPARSE_COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append({'name': 'enable',
'positional': False,
'required': False,
- 'help-text': SPARSE_ENABLE_HELP})
+ 'help-text': arguments.ENABLE_HELP})
args.append({'name': 'disable',
'positional': False,
'required': False,
- 'help-text': SPARSE_DISABLE_HELP})
+ 'help-text': arguments.DISABLE_HELP})
return metadata
def run_command(self, args, config):
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index e5146df..50e25ee 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -41,7 +41,3 @@ UPDATE_LOCAL_MANIFEST_DESCRIPTION = 'Updates the global manifest repository and UPDATE_LOCAL_MANIFEST_HELP = 'Updates the local manifest file found in the <workspace>/repo directory prior to performing sync operations.'
SYNC_OVERRIDE_HELP = 'Without this flag sync operations will not be completed if the updated manifest adds/removes repositories or if there are local commits on the target branch.'
-#Args for sparse_command.py
-SPARSE_COMMAND_DESCRIPTION = 'Displays the current sparse checkout status and allows for changing the sparse checkout state.'
-SPARSE_ENABLE_HELP = 'Enables sparse checkout if supported by the manifest.'
-SPARSE_DISABLE_HELP = 'Disables sparse checkout if enabled.'
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [edk2-devel][edk2-staging/EdkRepo][PATCH v2 6/8] EdkRepo: Argument Strings Refactor - Sync Command
2019-11-06 22:39 [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Desimone, Ashley E
` (3 preceding siblings ...)
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 5/8] EdkRepo: Argument Strings Refactor - Sparse Command Desimone, Ashley E
@ 2019-11-06 22:39 ` Desimone, Ashley E
2019-11-06 22:44 ` Nate DeSimone
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 7/8] EdkRepo: Argument Strings Refactor - Clone Command Desimone, Ashley E
` (2 subsequent siblings)
7 siblings, 1 reply; 16+ messages in thread
From: Desimone, Ashley E @ 2019-11-06 22:39 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya
Move all argument strings for sync_command.py to
edkrepo/commands/arguments/sparse_args.py
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/commands/arguments/sync_args.py | 17 +++++++++++++++++
edkrepo/commands/sync_command.py | 13 +++++--------
edkrepo/common/argument_strings.py | 8 --------
3 files changed, 22 insertions(+), 16 deletions(-)
create mode 100644 edkrepo/commands/arguments/sync_args.py
diff --git a/edkrepo/commands/arguments/sync_args.py b/edkrepo/commands/arguments/sync_args.py
new file mode 100644
index 0000000..9961f85
--- /dev/null
+++ b/edkrepo/commands/arguments/sync_args.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python3
+#
+## @file
+# sync_args.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+''' Contains the help and description strings for arguments in the
+sync command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Updates the local copy of the current combination\'s target branches by pulling the latest changes from the server. Does not update local branches.'
+FETCH_HELP = 'Performs a fetch only sync, no changes will be made to the local workspace.'
+UPDATE_LOCAL_MANIFEST_HELP = 'Updates the local copy of the project manifest file prior to performing sync operations.'
+OVERRIDE_HELP = 'Ignore warnings and proceed with sync operations.'
\ No newline at end of file
diff --git a/edkrepo/commands/sync_command.py b/edkrepo/commands/sync_command.py
index 13f0536..8509bce 100644
--- a/edkrepo/commands/sync_command.py
+++ b/edkrepo/commands/sync_command.py
@@ -19,11 +19,10 @@ 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
from edkrepo.common.progress_handler import GitProgressHandler
from edkrepo.common.edkrepo_exception import EdkrepoUncommitedChangesException, EdkrepoManifestNotFoundException
from edkrepo.common.edkrepo_exception import EdkrepoManifestChangedException
-from edkrepo.common.argument_strings import SYNC_COMMAND_DESCRIPTION, FETCH_DESCRIPTION, FETCH_HELP, SYNC_OVERRIDE_HELP
-from edkrepo.common.argument_strings import UPDATE_LOCAL_MANIFEST_HELP, UPDATE_LOCAL_MANIFEST_DESCRIPTION
from edkrepo.common.humble import SYNC_UNCOMMITED_CHANGES, SYNC_MANIFEST_NOT_FOUND, SYNC_URL_CHANGE, SYNC_COMBO_CHANGE
from edkrepo.common.humble import SYNC_SOURCE_MOVE_WARNING, SYNC_REMOVE_WARNING, SYNC_REMOVE_LIST_END_FORMATTING
from edkrepo.common.humble import SYNC_MANIFEST_DIFF_WARNING, SYNC_MANIFEST_UPDATE
@@ -54,24 +53,22 @@ class SyncCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'sync'
- metadata['help-text'] = SYNC_COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append({'name' : 'fetch',
'positional' : False,
'required' : False,
- 'description': FETCH_DESCRIPTION,
- 'help-text' : FETCH_HELP})
+ 'help-text': arguments.FETCH_HELP})
args.append({'name' : 'update-local-manifest',
'short-name': 'u',
'required' : False,
- 'description' : UPDATE_LOCAL_MANIFEST_DESCRIPTION,
- 'help-text' : UPDATE_LOCAL_MANIFEST_HELP})
+ 'help-text' : arguments.UPDATE_LOCAL_MANIFEST_HELP})
args.append({'name' : 'override',
'short-name': 'o',
'positional' : False,
'required' : False,
- 'help-text' : SYNC_OVERRIDE_HELP})
+ 'help-text' : arguments.OVERRIDE_HELP})
args.append(SubmoduleSkipArgument)
return metadata
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index 50e25ee..b001441 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -33,11 +33,3 @@ SPARSE_HELP = 'Enables a sparse checkout based on the contents of the DSC file(s
NO_SPARSE_DESCRIPTION = 'Disables sparse checkout support.'
NO_SPARSE_HELP = 'Disables sparse checkout if enabled by default in the manifest.\n'
-#Args for sync_command.py
-SYNC_COMMAND_DESCRIPTION = 'Updates the local copy of the current combination\'s target branches with the latest changes from the server. Does not update local branches.'
-FETCH_DESCRIPTION = 'Downloads the changes from the remote server to the local workspace with out performing a merge'
-FETCH_HELP = 'Performs a fetch only sync, no changes will be made to the local workspace'
-UPDATE_LOCAL_MANIFEST_DESCRIPTION = 'Updates the global manifest repository and local manifest file prior to performing a sync'
-UPDATE_LOCAL_MANIFEST_HELP = 'Updates the local manifest file found in the <workspace>/repo directory prior to performing sync operations.'
-SYNC_OVERRIDE_HELP = 'Without this flag sync operations will not be completed if the updated manifest adds/removes repositories or if there are local commits on the target branch.'
-
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 6/8] EdkRepo: Argument Strings Refactor - Sync Command
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 6/8] EdkRepo: Argument Strings Refactor - Sync Command Desimone, Ashley E
@ 2019-11-06 22:44 ` Nate DeSimone
0 siblings, 0 replies; 16+ messages in thread
From: Nate DeSimone @ 2019-11-06 22:44 UTC (permalink / raw)
To: Desimone, Ashley E, devel@edk2.groups.io; +Cc: Pandya, Puja
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: Desimone, Ashley E <ashley.e.desimone@intel.com>
Sent: Wednesday, November 6, 2019 2:40 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>
Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 6/8] EdkRepo: Argument Strings Refactor - Sync Command
Move all argument strings for sync_command.py to edkrepo/commands/arguments/sparse_args.py
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/commands/arguments/sync_args.py | 17 +++++++++++++++++
edkrepo/commands/sync_command.py | 13 +++++--------
edkrepo/common/argument_strings.py | 8 --------
3 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 edkrepo/commands/arguments/sync_args.py
diff --git a/edkrepo/commands/arguments/sync_args.py b/edkrepo/commands/arguments/sync_args.py
new file mode 100644
index 0000000..9961f85
--- /dev/null
+++ b/edkrepo/commands/arguments/sync_args.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python3
+#
+## @file
+# sync_args.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> #
+SPDX-License-Identifier: BSD-2-Clause-Patent #
+
+''' Contains the help and description strings for arguments in the sync
+command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Updates the local copy of the current combination\'s target branches by pulling the latest changes from the server. Does not update local branches.'
+FETCH_HELP = 'Performs a fetch only sync, no changes will be made to the local workspace.'
+UPDATE_LOCAL_MANIFEST_HELP = 'Updates the local copy of the project manifest file prior to performing sync operations.'
+OVERRIDE_HELP = 'Ignore warnings and proceed with sync operations.'
\ No newline at end of file
diff --git a/edkrepo/commands/sync_command.py b/edkrepo/commands/sync_command.py
index 13f0536..8509bce 100644
--- a/edkrepo/commands/sync_command.py
+++ b/edkrepo/commands/sync_command.py
@@ -19,11 +19,10 @@ 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
from edkrepo.common.progress_handler import GitProgressHandler from edkrepo.common.edkrepo_exception import EdkrepoUncommitedChangesException, EdkrepoManifestNotFoundException from edkrepo.common.edkrepo_exception import EdkrepoManifestChangedException -from edkrepo.common.argument_strings import SYNC_COMMAND_DESCRIPTION, FETCH_DESCRIPTION, FETCH_HELP, SYNC_OVERRIDE_HELP -from edkrepo.common.argument_strings import UPDATE_LOCAL_MANIFEST_HELP, UPDATE_LOCAL_MANIFEST_DESCRIPTION from edkrepo.common.humble import SYNC_UNCOMMITED_CHANGES, SYNC_MANIFEST_NOT_FOUND, SYNC_URL_CHANGE, SYNC_COMBO_CHANGE from edkrepo.common.humble import SYNC_SOURCE_MOVE_WARNING, SYNC_REMOVE_WARNING, SYNC_REMOVE_LIST_END_FORMATTING from edkrepo.common.humble import SYNC_MANIFEST_DIFF_WARNING, SYNC_MANIFEST_UPDATE @@ -54,24 +53,22 @@ class SyncCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'sync'
- metadata['help-text'] = SYNC_COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append({'name' : 'fetch',
'positional' : False,
'required' : False,
- 'description': FETCH_DESCRIPTION,
- 'help-text' : FETCH_HELP})
+ 'help-text': arguments.FETCH_HELP})
args.append({'name' : 'update-local-manifest',
'short-name': 'u',
'required' : False,
- 'description' : UPDATE_LOCAL_MANIFEST_DESCRIPTION,
- 'help-text' : UPDATE_LOCAL_MANIFEST_HELP})
+ 'help-text' :
+ arguments.UPDATE_LOCAL_MANIFEST_HELP})
args.append({'name' : 'override',
'short-name': 'o',
'positional' : False,
'required' : False,
- 'help-text' : SYNC_OVERRIDE_HELP})
+ 'help-text' : arguments.OVERRIDE_HELP})
args.append(SubmoduleSkipArgument)
return metadata
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index 50e25ee..b001441 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -33,11 +33,3 @@ SPARSE_HELP = 'Enables a sparse checkout based on the contents of the DSC file(s NO_SPARSE_DESCRIPTION = 'Disables sparse checkout support.'
NO_SPARSE_HELP = 'Disables sparse checkout if enabled by default in the manifest.\n'
-#Args for sync_command.py
-SYNC_COMMAND_DESCRIPTION = 'Updates the local copy of the current combination\'s target branches with the latest changes from the server. Does not update local branches.'
-FETCH_DESCRIPTION = 'Downloads the changes from the remote server to the local workspace with out performing a merge'
-FETCH_HELP = 'Performs a fetch only sync, no changes will be made to the local workspace'
-UPDATE_LOCAL_MANIFEST_DESCRIPTION = 'Updates the global manifest repository and local manifest file prior to performing a sync'
-UPDATE_LOCAL_MANIFEST_HELP = 'Updates the local manifest file found in the <workspace>/repo directory prior to performing sync operations.'
-SYNC_OVERRIDE_HELP = 'Without this flag sync operations will not be completed if the updated manifest adds/removes repositories or if there are local commits on the target branch.'
-
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [edk2-devel][edk2-staging/EdkRepo][PATCH v2 7/8] EdkRepo: Argument Strings Refactor - Clone Command
2019-11-06 22:39 [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Desimone, Ashley E
` (4 preceding siblings ...)
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 6/8] EdkRepo: Argument Strings Refactor - Sync Command Desimone, Ashley E
@ 2019-11-06 22:39 ` Desimone, Ashley E
2019-11-06 22:44 ` Nate DeSimone
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 8/8] EdkRepo: Argument Strings Refactor - EdkRepo Command Desimone, Ashley E
2019-11-06 22:44 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Nate DeSimone
7 siblings, 1 reply; 16+ messages in thread
From: Desimone, Ashley E @ 2019-11-06 22:39 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya
Move all argument strings for clone_command.py to
edkrepo/commands/arguments/clone_args.py
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/commands/arguments/clone_args.py | 22 ++++++++++++++++++++++
edkrepo/commands/clone_command.py | 24 +++++++-----------------
edkrepo/common/argument_strings.py | 14 --------------
3 files changed, 29 insertions(+), 31 deletions(-)
create mode 100644 edkrepo/commands/arguments/clone_args.py
diff --git a/edkrepo/commands/arguments/clone_args.py b/edkrepo/commands/arguments/clone_args.py
new file mode 100644
index 0000000..b143adc
--- /dev/null
+++ b/edkrepo/commands/arguments/clone_args.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python3
+#
+## @file
+# clone_args.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+''' Contains the help and description strings for arguments in the
+clone command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Downloads a project and creates a new workspace.'
+WORKSPACE_HELP = ('The destination for the newly created workspace, this must be an empty directory.\n'
+ 'A value of "." indicates the current working directory.')
+PROJECT_MANIFEST_HELP = ('Either a project name as listed by "edkrepo manifest" or the path to a project manifest file.\n'
+ 'If a relative path is provided clone will first search relative to the current working directory'
+ ' and then search relative to the global manifest repository.')
+COMBINATION_HELP = 'The name of the combination to checkout. If not specified the projects default combination is used.'
+SPARSE_HELP = 'Enables sparse checkout if supported by the project manifest file.'
+NO_SPARSE_HELP = 'Disables sparse checkout if the project manifest file enables it by default.'
\ No newline at end of file
diff --git a/edkrepo/commands/clone_command.py b/edkrepo/commands/clone_command.py
index e74c4e4..2400272 100644
--- a/edkrepo/commands/clone_command.py
+++ b/edkrepo/commands/clone_command.py
@@ -10,14 +10,9 @@
import os
import shutil
-
-# Our modules
from edkrepo.commands.edkrepo_command import EdkrepoCommand
from edkrepo.commands.edkrepo_command import SubmoduleSkipArgument
-from edkrepo.common.argument_strings import PROJECT_OR_MANIFEST_DESCRIPTION, PROJECT_OR_MANIFEST_HELP
-from edkrepo.common.argument_strings import COMBINATION_DESCRIPTION, COMBINATION_HELP, WORKSPACE_DESCRIPTION
-from edkrepo.common.argument_strings import WORKSPACE_HELP, CLONE_COMMAND_DESCRIPTION
-from edkrepo.common.argument_strings import SPARSE_HELP, SPARSE_DESCRIPTION, NO_SPARSE_DESCRIPTION, NO_SPARSE_HELP
+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
@@ -35,37 +30,32 @@ class CloneCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'clone'
- metadata['help-text'] = CLONE_COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append({'name': 'Workspace',
'positional': True,
'position': 0,
'required': True,
- 'description': WORKSPACE_DESCRIPTION,
- 'help-text': WORKSPACE_HELP})
+ 'help-text': arguments.WORKSPACE_HELP})
args.append({'name': 'ProjectNameOrManifestFile',
'positional': True,
'position': 1,
'required': True,
- 'description': PROJECT_OR_MANIFEST_DESCRIPTION,
- 'help-text': PROJECT_OR_MANIFEST_HELP})
+ 'help-text': arguments.PROJECT_MANIFEST_HELP})
args.append({'name': 'Combination',
'positional': True,
'position': 2,
'required': False,
- 'description': COMBINATION_DESCRIPTION,
- 'help-text': COMBINATION_HELP})
+ 'help-text': arguments.COMBINATION_HELP})
args.append({'name': 'sparse',
'positional': False,
'required': False,
- 'description': SPARSE_DESCRIPTION,
- 'help-text': SPARSE_HELP})
+ 'help-text': arguments.SPARSE_HELP})
args.append({'name': 'nosparse',
'positional': False,
'required': False,
- 'description': NO_SPARSE_DESCRIPTION,
- 'help-text': NO_SPARSE_HELP})
+ 'help-text': arguments.NO_SPARSE_HELP})
args.append(SubmoduleSkipArgument)
return metadata
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index b001441..75e13ee 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -18,18 +18,4 @@ OVERRIDE_HELP = 'Ignore warnings'
SUBMODULE_SKIP_HELP = 'Skip the pull or sync of any submodules.'
COLOR_HELP = 'Force color output (useful with \'less -r\')'
-#Args for clone_command.py
-CLONE_COMMAND_DESCRIPTION = 'Downloads a project and creates a new workspace'
-WORKSPACE_DESCRIPTION = 'The workspace in which to clone.'
-WORKSPACE_HELP = 'The workspace in which to clone. This must refer to an empty directory. A value of "." indicates the current working directory \n'
-PROJECT_OR_MANIFEST_DESCRIPTION = 'The project name as listed in the CiIndex.xml file or the name of the manifest file'
-PROJECT_OR_MANIFEST_HELP = ('The project name as listed in the CiIndex.xml file or a path to a manifest file. If a relative path to a manifest file is provided ' +
- 'clone will attempt to find it by first searching relative to the current working directory and then searchting relative to the ' +
- 'global manifest repository \n')
-COMBINATION_DESCRIPTION = 'The combination to checkout'
-COMBINATION_HELP = 'The combination name to checkout if not specified the default combination is used.\n'
-SPARSE_DESCRIPTION = 'Enables sparse checkout support.'
-SPARSE_HELP = 'Enables a sparse checkout based on the contents of the DSC file(s) listed by the manifest.\n'
-NO_SPARSE_DESCRIPTION = 'Disables sparse checkout support.'
-NO_SPARSE_HELP = 'Disables sparse checkout if enabled by default in the manifest.\n'
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 7/8] EdkRepo: Argument Strings Refactor - Clone Command
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 7/8] EdkRepo: Argument Strings Refactor - Clone Command Desimone, Ashley E
@ 2019-11-06 22:44 ` Nate DeSimone
0 siblings, 0 replies; 16+ messages in thread
From: Nate DeSimone @ 2019-11-06 22:44 UTC (permalink / raw)
To: Desimone, Ashley E, devel@edk2.groups.io; +Cc: Pandya, Puja
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: Desimone, Ashley E <ashley.e.desimone@intel.com>
Sent: Wednesday, November 6, 2019 2:40 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>
Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 7/8] EdkRepo: Argument Strings Refactor - Clone Command
Move all argument strings for clone_command.py to edkrepo/commands/arguments/clone_args.py
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/commands/arguments/clone_args.py | 22 ++++++++++++++++++++++
edkrepo/commands/clone_command.py | 24 +++++++-----------------
edkrepo/common/argument_strings.py | 14 --------------
3 files changed, 29 insertions(+), 31 deletions(-) create mode 100644 edkrepo/commands/arguments/clone_args.py
diff --git a/edkrepo/commands/arguments/clone_args.py b/edkrepo/commands/arguments/clone_args.py
new file mode 100644
index 0000000..b143adc
--- /dev/null
+++ b/edkrepo/commands/arguments/clone_args.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python3
+#
+## @file
+# clone_args.py
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> #
+SPDX-License-Identifier: BSD-2-Clause-Patent #
+
+''' Contains the help and description strings for arguments in the
+clone command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Downloads a project and creates a new workspace.'
+WORKSPACE_HELP = ('The destination for the newly created workspace, this must be an empty directory.\n'
+ 'A value of "." indicates the current working
+directory.') PROJECT_MANIFEST_HELP = ('Either a project name as listed by "edkrepo manifest" or the path to a project manifest file.\n'
+ 'If a relative path is provided clone will first search relative to the current working directory'
+ ' and then search relative to the global
+manifest repository.') COMBINATION_HELP = 'The name of the combination to checkout. If not specified the projects default combination is used.'
+SPARSE_HELP = 'Enables sparse checkout if supported by the project manifest file.'
+NO_SPARSE_HELP = 'Disables sparse checkout if the project manifest file enables it by default.'
\ No newline at end of file
diff --git a/edkrepo/commands/clone_command.py b/edkrepo/commands/clone_command.py
index e74c4e4..2400272 100644
--- a/edkrepo/commands/clone_command.py
+++ b/edkrepo/commands/clone_command.py
@@ -10,14 +10,9 @@
import os
import shutil
-
-# Our modules
from edkrepo.commands.edkrepo_command import EdkrepoCommand from edkrepo.commands.edkrepo_command import SubmoduleSkipArgument -from edkrepo.common.argument_strings import PROJECT_OR_MANIFEST_DESCRIPTION, PROJECT_OR_MANIFEST_HELP -from edkrepo.common.argument_strings import COMBINATION_DESCRIPTION, COMBINATION_HELP, WORKSPACE_DESCRIPTION -from edkrepo.common.argument_strings import WORKSPACE_HELP, CLONE_COMMAND_DESCRIPTION -from edkrepo.common.argument_strings import SPARSE_HELP, SPARSE_DESCRIPTION, NO_SPARSE_DESCRIPTION, NO_SPARSE_HELP
+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 @@ -35,37 +30,32 @@ class CloneCommand(EdkrepoCommand):
def get_metadata(self):
metadata = {}
metadata['name'] = 'clone'
- metadata['help-text'] = CLONE_COMMAND_DESCRIPTION
+ metadata['help-text'] = arguments.COMMAND_DESCRIPTION
args = []
metadata['arguments'] = args
args.append({'name': 'Workspace',
'positional': True,
'position': 0,
'required': True,
- 'description': WORKSPACE_DESCRIPTION,
- 'help-text': WORKSPACE_HELP})
+ 'help-text': arguments.WORKSPACE_HELP})
args.append({'name': 'ProjectNameOrManifestFile',
'positional': True,
'position': 1,
'required': True,
- 'description': PROJECT_OR_MANIFEST_DESCRIPTION,
- 'help-text': PROJECT_OR_MANIFEST_HELP})
+ 'help-text': arguments.PROJECT_MANIFEST_HELP})
args.append({'name': 'Combination',
'positional': True,
'position': 2,
'required': False,
- 'description': COMBINATION_DESCRIPTION,
- 'help-text': COMBINATION_HELP})
+ 'help-text': arguments.COMBINATION_HELP})
args.append({'name': 'sparse',
'positional': False,
'required': False,
- 'description': SPARSE_DESCRIPTION,
- 'help-text': SPARSE_HELP})
+ 'help-text': arguments.SPARSE_HELP})
args.append({'name': 'nosparse',
'positional': False,
'required': False,
- 'description': NO_SPARSE_DESCRIPTION,
- 'help-text': NO_SPARSE_HELP})
+ 'help-text': arguments.NO_SPARSE_HELP})
args.append(SubmoduleSkipArgument)
return metadata
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index b001441..75e13ee 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -18,18 +18,4 @@ OVERRIDE_HELP = 'Ignore warnings'
SUBMODULE_SKIP_HELP = 'Skip the pull or sync of any submodules.'
COLOR_HELP = 'Force color output (useful with \'less -r\')'
-#Args for clone_command.py
-CLONE_COMMAND_DESCRIPTION = 'Downloads a project and creates a new workspace'
-WORKSPACE_DESCRIPTION = 'The workspace in which to clone.'
-WORKSPACE_HELP = 'The workspace in which to clone. This must refer to an empty directory. A value of "." indicates the current working directory \n'
-PROJECT_OR_MANIFEST_DESCRIPTION = 'The project name as listed in the CiIndex.xml file or the name of the manifest file'
-PROJECT_OR_MANIFEST_HELP = ('The project name as listed in the CiIndex.xml file or a path to a manifest file. If a relative path to a manifest file is provided ' +
- 'clone will attempt to find it by first searching relative to the current working directory and then searchting relative to the ' +
- 'global manifest repository \n')
-COMBINATION_DESCRIPTION = 'The combination to checkout'
-COMBINATION_HELP = 'The combination name to checkout if not specified the default combination is used.\n'
-SPARSE_DESCRIPTION = 'Enables sparse checkout support.'
-SPARSE_HELP = 'Enables a sparse checkout based on the contents of the DSC file(s) listed by the manifest.\n'
-NO_SPARSE_DESCRIPTION = 'Disables sparse checkout support.'
-NO_SPARSE_HELP = 'Disables sparse checkout if enabled by default in the manifest.\n'
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [edk2-devel][edk2-staging/EdkRepo][PATCH v2 8/8] EdkRepo: Argument Strings Refactor - EdkRepo Command
2019-11-06 22:39 [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Desimone, Ashley E
` (5 preceding siblings ...)
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 7/8] EdkRepo: Argument Strings Refactor - Clone Command Desimone, Ashley E
@ 2019-11-06 22:39 ` Desimone, Ashley E
2019-11-06 22:44 ` Nate DeSimone
2019-11-06 22:44 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Nate DeSimone
7 siblings, 1 reply; 16+ messages in thread
From: Desimone, Ashley E @ 2019-11-06 22:39 UTC (permalink / raw)
To: devel; +Cc: Nate DeSimone, Puja Pandya
Move all argument strings for edkrepo_command.py to
edkrepo/commands/arguments/edkrepo_cmd_args.py
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
.../arguments/edkrepo_cmd_args.py} | 9 +++------
edkrepo/commands/edkrepo_command.py | 16 ++++++----------
2 files changed, 9 insertions(+), 16 deletions(-)
rename edkrepo/{common/argument_strings.py => commands/arguments/edkrepo_cmd_args.py} (65%)
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/commands/arguments/edkrepo_cmd_args.py
similarity index 65%
rename from edkrepo/common/argument_strings.py
rename to edkrepo/commands/arguments/edkrepo_cmd_args.py
index 75e13ee..f2d7eb6 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/commands/arguments/edkrepo_cmd_args.py
@@ -7,15 +7,12 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
-'''Contains help and description strings for arguments in command meta data.'''
+'''Contains help and description strings for arguments in the edkrepo_command
+meta data.
+'''
-#Args for edk_command.py
-VERBOSE_DESCRIPTION = 'Enable verbose output'
VERBOSE_HELP = 'Increases command verbosity'
-DRY_RUN_DESCRIPTION = "Don't actually do anything"
DRY_RUN_HELP = "Don't actually do anything"
OVERRIDE_HELP = 'Ignore warnings'
SUBMODULE_SKIP_HELP = 'Skip the pull or sync of any submodules.'
COLOR_HELP = 'Force color output (useful with \'less -r\')'
-
-
diff --git a/edkrepo/commands/edkrepo_command.py b/edkrepo/commands/edkrepo_command.py
index 75b6f35..f69bdb8 100644
--- a/edkrepo/commands/edkrepo_command.py
+++ b/edkrepo/commands/edkrepo_command.py
@@ -7,9 +7,7 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
-# Our modules
-from edkrepo.common.argument_strings import VERBOSE_DESCRIPTION, VERBOSE_HELP, DRY_RUN_DESCRIPTION, DRY_RUN_HELP, COLOR_HELP
-from edkrepo.common.argument_strings import OVERRIDE_HELP, SUBMODULE_SKIP_HELP
+import edkrepo.commands.arguments.edkrepo_cmd_args as arguments
class EdkrepoCommand(object):
@@ -25,30 +23,28 @@ VerboseArgument = {'name': 'verbose',
'short-name': 'v',
'positional': False,
'required': False,
- 'description': VERBOSE_DESCRIPTION ,
- 'help-text': VERBOSE_HELP}
+ 'help-text': arguments.VERBOSE_HELP}
DryRunArgument = {'name': 'dry-run',
'positional': False,
'required': False,
- 'description': DRY_RUN_DESCRIPTION,
- 'help-text': DRY_RUN_HELP}
+ 'help-text': arguments.DRY_RUN_HELP}
OverrideArgument = {'name': 'override',
'short-name': 'o',
'positional': False,
'required': False,
- 'help-text': OVERRIDE_HELP}
+ 'help-text': arguments.OVERRIDE_HELP}
ColorArgument = {'name' : 'color',
'short-name': 'c',
'positional' : False,
'required' : False,
- 'help-text' : COLOR_HELP}
+ 'help-text' : arguments.COLOR_HELP}
SubmoduleSkipArgument = {'name': 'skip-submodule',
'short-name' : 's',
'positional' : False,
'required' : False,
- 'help-text' : SUBMODULE_SKIP_HELP}
+ 'help-text' : arguments.SUBMODULE_SKIP_HELP}
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 8/8] EdkRepo: Argument Strings Refactor - EdkRepo Command
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 8/8] EdkRepo: Argument Strings Refactor - EdkRepo Command Desimone, Ashley E
@ 2019-11-06 22:44 ` Nate DeSimone
0 siblings, 0 replies; 16+ messages in thread
From: Nate DeSimone @ 2019-11-06 22:44 UTC (permalink / raw)
To: Desimone, Ashley E, devel@edk2.groups.io; +Cc: Pandya, Puja
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: Desimone, Ashley E <ashley.e.desimone@intel.com>
Sent: Wednesday, November 6, 2019 2:40 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>
Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 8/8] EdkRepo: Argument Strings Refactor - EdkRepo Command
Move all argument strings for edkrepo_command.py to edkrepo/commands/arguments/edkrepo_cmd_args.py
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
.../arguments/edkrepo_cmd_args.py} | 9 +++------
edkrepo/commands/edkrepo_command.py | 16 ++++++----------
2 files changed, 9 insertions(+), 16 deletions(-) rename edkrepo/{common/argument_strings.py => commands/arguments/edkrepo_cmd_args.py} (65%)
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/commands/arguments/edkrepo_cmd_args.py
similarity index 65%
rename from edkrepo/common/argument_strings.py
rename to edkrepo/commands/arguments/edkrepo_cmd_args.py
index 75e13ee..f2d7eb6 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/commands/arguments/edkrepo_cmd_args.py
@@ -7,15 +7,12 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent #
-'''Contains help and description strings for arguments in command meta data.'''
+'''Contains help and description strings for arguments in the
+edkrepo_command meta data.
+'''
-#Args for edk_command.py
-VERBOSE_DESCRIPTION = 'Enable verbose output'
VERBOSE_HELP = 'Increases command verbosity'
-DRY_RUN_DESCRIPTION = "Don't actually do anything"
DRY_RUN_HELP = "Don't actually do anything"
OVERRIDE_HELP = 'Ignore warnings'
SUBMODULE_SKIP_HELP = 'Skip the pull or sync of any submodules.'
COLOR_HELP = 'Force color output (useful with \'less -r\')'
-
-
diff --git a/edkrepo/commands/edkrepo_command.py b/edkrepo/commands/edkrepo_command.py
index 75b6f35..f69bdb8 100644
--- a/edkrepo/commands/edkrepo_command.py
+++ b/edkrepo/commands/edkrepo_command.py
@@ -7,9 +7,7 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent #
-# Our modules
-from edkrepo.common.argument_strings import VERBOSE_DESCRIPTION, VERBOSE_HELP, DRY_RUN_DESCRIPTION, DRY_RUN_HELP, COLOR_HELP -from edkrepo.common.argument_strings import OVERRIDE_HELP, SUBMODULE_SKIP_HELP
+import edkrepo.commands.arguments.edkrepo_cmd_args as arguments
class EdkrepoCommand(object):
@@ -25,30 +23,28 @@ VerboseArgument = {'name': 'verbose',
'short-name': 'v',
'positional': False,
'required': False,
- 'description': VERBOSE_DESCRIPTION ,
- 'help-text': VERBOSE_HELP}
+ 'help-text': arguments.VERBOSE_HELP}
DryRunArgument = {'name': 'dry-run',
'positional': False,
'required': False,
- 'description': DRY_RUN_DESCRIPTION,
- 'help-text': DRY_RUN_HELP}
+ 'help-text': arguments.DRY_RUN_HELP}
OverrideArgument = {'name': 'override',
'short-name': 'o',
'positional': False,
'required': False,
- 'help-text': OVERRIDE_HELP}
+ 'help-text': arguments.OVERRIDE_HELP}
ColorArgument = {'name' : 'color',
'short-name': 'c',
'positional' : False,
'required' : False,
- 'help-text' : COLOR_HELP}
+ 'help-text' : arguments.COLOR_HELP}
SubmoduleSkipArgument = {'name': 'skip-submodule',
'short-name' : 's',
'positional' : False,
'required' : False,
- 'help-text' : SUBMODULE_SKIP_HELP}
+ 'help-text' : arguments.SUBMODULE_SKIP_HELP}
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings
2019-11-06 22:39 [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Desimone, Ashley E
` (6 preceding siblings ...)
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 8/8] EdkRepo: Argument Strings Refactor - EdkRepo Command Desimone, Ashley E
@ 2019-11-06 22:44 ` Nate DeSimone
7 siblings, 0 replies; 16+ messages in thread
From: Nate DeSimone @ 2019-11-06 22:44 UTC (permalink / raw)
To: Desimone, Ashley E, devel@edk2.groups.io; +Cc: Pandya, Puja
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: Desimone, Ashley E <ashley.e.desimone@intel.com>
Sent: Wednesday, November 6, 2019 2:40 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>
Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
edkrepo/common/argument_strings.py | 5 -----
1 file changed, 5 deletions(-)
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index 0a7db59..93db079 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -33,11 +33,6 @@ SPARSE_HELP = 'Enables a sparse checkout based on the contents of the DSC file(s NO_SPARSE_DESCRIPTION = 'Disables sparse checkout support.'
NO_SPARSE_HELP = 'Disables sparse checkout if enabled by default in the manifest.\n'
-#Args for send_review_command.py
-BRANCH_DESCRIPTION = 'Branch description'
-BRANCH_HELP = 'Branch help'
-DRY_RUN_HELP = 'Lists the reviewers, target branch, and affected files but does not send a review.'
-
#Args for sync_command.py
SYNC_COMMAND_DESCRIPTION = 'Updates the local copy of the current combination\'s target branches with the latest changes from the server. Does not update local branches.'
FETCH_DESCRIPTION = 'Downloads the changes from the remote server to the local workspace with out performing a merge'
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 16+ messages in thread