public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Desimone, Ashley E" <ashley.e.desimone@intel.com>
To: devel@edk2.groups.io
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Puja Pandya <puja.pandya@intel.com>
Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 6/8] EdkRepo: Argument Strings Refactor - Sync Command
Date: Wed,  6 Nov 2019 14:39:42 -0800	[thread overview]
Message-ID: <20191106223944.18036-6-ashley.e.desimone@intel.com> (raw)
In-Reply-To: <20191106223944.18036-1-ashley.e.desimone@intel.com>

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


  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 ` [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
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 ` Desimone, Ashley E [this message]
2019-11-06 22:44   ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 6/8] EdkRepo: Argument Strings Refactor - Sync Command 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-6-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