From: "Desimone, Ashley E" <ashley.e.desimone@intel.com>
To: devel@edk2.groups.io
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>,
Puja Pandya <puja.pandya@intel.com>
Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 4/8] EdkRepo: Argument String Refactor - Checkout Command
Date: Wed, 6 Nov 2019 14:39:40 -0800 [thread overview]
Message-ID: <20191106223944.18036-4-ashley.e.desimone@intel.com> (raw)
In-Reply-To: <20191106223944.18036-1-ashley.e.desimone@intel.com>
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
next prev parent reply other threads:[~2019-11-06 22:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
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: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
2019-11-06 22:44 ` Nate DeSimone
2019-11-06 22:39 ` Desimone, Ashley E [this message]
2019-11-06 22:44 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 4/8] EdkRepo: Argument String Refactor - Checkout Command 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
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
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
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 ` 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191106223944.18036-4-ashley.e.desimone@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox