public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ashley E Desimone" <ashley.e.desimone@intel.com>
To: devel@edk2.groups.io
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Puja Pandya <puja.pandya@intel.com>,
	Erik Bjorge <erik.c.bjorge@intel.com>,
	Bret Barkelew <Bret.Barkelew@microsoft.com>,
	Prince Agyeman <prince.agyeman@intel.com>
Subject: [edk2-staing/EdkRepo] [PATCH 2/4] EdkRepo: Remove unused functions from common_repo_functions.py
Date: Sun, 10 May 2020 17:50:24 -0700	[thread overview]
Message-ID: <20200511005026.23532-3-ashley.e.desimone@intel.com> (raw)
In-Reply-To: <20200511005026.23532-1-ashley.e.desimone@intel.com>

Remove unused functions from common_repo_functions.py and remove
any remaining imports of them.

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>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
---
 edkrepo/commands/manifest_command.py    |  2 +-
 edkrepo/common/common_repo_functions.py | 40 ---------------------------------
 edkrepo/common/humble.py                |  4 ++--
 3 files changed, 3 insertions(+), 43 deletions(-)

diff --git a/edkrepo/commands/manifest_command.py b/edkrepo/commands/manifest_command.py
index bb6252d..5c6184f 100644
--- a/edkrepo/commands/manifest_command.py
+++ b/edkrepo/commands/manifest_command.py
@@ -16,7 +16,7 @@ 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, EdkrepoManifestNotFoundException
-from edkrepo.common.common_repo_functions import pull_latest_manifest_repo, validate_manifest_repo
+from edkrepo.common.common_repo_functions import validate_manifest_repo
 from edkrepo.common.ui_functions import init_color_console
 from edkrepo.common.workspace_maintenance.manifest_repos_maintenance import list_available_manifest_repos
 from edkrepo.common.workspace_maintenance.manifest_repos_maintenance import pull_all_manifest_repos
diff --git a/edkrepo/common/common_repo_functions.py b/edkrepo/common/common_repo_functions.py
index eb6c4c0..5ec834b 100644
--- a/edkrepo/common/common_repo_functions.py
+++ b/edkrepo/common/common_repo_functions.py
@@ -73,14 +73,6 @@ CLEAR_LINE = '\x1b[K'
 DEFAULT_REMOTE_NAME = 'origin'
 PRIMARY_REMOTE_NAME = 'primary'
 
-def pull_latest_manifest_repo(args, config, reset_hard=False):
-    repo_url = config['cfg_file'].manifest_repo_url
-    branch = config['cfg_file'].manifest_repo_branch
-    local_path = config['cfg_file'].manifest_repo_local_path
-    init_color_console(False)
-    pull_single_manifest_repo(repo_url, branch, local_path, reset_hard)
-
-
 def clone_repos(args, workspace_dir, repos_to_clone, project_client_side_hooks, config, skip_submodule, manifest):
     for repo_to_clone in repos_to_clone:
         local_repo_path = os.path.join(workspace_dir, repo_to_clone.root)
@@ -395,38 +387,6 @@ def checkout_repos(verbose, override, repos_to_checkout, workspace_path, manifes
         if repo_to_checkout.enable_submodule:
             maintain_submodules(repo_to_checkout, repo, verbose)
 
-def verify_manifest_data(global_manifest_directory, config, verbose=False, verify_all=False, verify_proj=None, verify_archived=False):
-    # Validate the project individual project selected
-    if verify_proj:
-        print(VERIFY_PROJ.format(verify_proj))
-        ci_index_path = os.path.join(config['cfg_file'].manifest_repo_abs_local_path, 'CiIndex.xml')
-        ci_index = CiIndexXml(ci_index_path)
-        try:
-            proj_path = find_project_in_index(verify_proj, ci_index, config['cfg_file'].manifest_repo_abs_local_path, VERIFY_PROJ_NOT_IN_INDEX.format(verify_proj))
-        except EdkrepoInvalidParametersException:
-            raise
-        if proj_path:
-            proj_val_data = validate_manifestfiles([proj_path])
-            proj_val_error = get_manifest_validation_status(proj_val_data)
-            if proj_val_error:
-                if verbose:
-                    print_manifest_errors(proj_val_data)
-                raise EdkrepoManifestInvalidException(VERIFY_PROJ_FAIL.format(verify_proj))
-
-    # Validate the entire global manifest repository.
-    if verify_all:
-        print(VERIFY_GLOBAL)
-        if verify_archived:
-            print(VERIFY_ARCHIVED)
-        # Attempt to make sure the manifest data is good
-        manifestfile_validation_data = validate_manifestrepo(global_manifest_directory, verify_archived)
-        manifest_repo_error = get_manifest_validation_status(manifestfile_validation_data)
-        # Display errors
-        if manifest_repo_error:
-            print(VERIFY_GLOBAL_FAIL)
-            if verbose:
-                print_manifest_errors(manifestfile_validation_data)
-
 def validate_manifest_repo(manifest_repo, verbose=False, archived=False):
     print(VERIFY_GLOBAL)
     if archived:
diff --git a/edkrepo/common/humble.py b/edkrepo/common/humble.py
index 8ca38bb..f905357 100644
--- a/edkrepo/common/humble.py
+++ b/edkrepo/common/humble.py
@@ -41,7 +41,7 @@ SYNC_COMMITS_ON_MASTER = 'Commits were found on {0} branch.\n  (use the "--overr
 SYNC_ERROR = '\nError: Some repositories were not updated.'
 SYNC_MANIFEST_NOT_FOUND = 'A manifest for project, {0}, was not found.\nTo complete this operation please rerun the command with the --override flag\n' + SYNC_EXIT
 SYNC_URL_CHANGE = 'The URL for the remote, {0} has changed.\n' + SYNC_EXIT
-SYNC_COMBO_CHANGE = 'The current checked out combination, {0}, does not exist in the latest manifest for project, {1}\n' 
+SYNC_COMBO_CHANGE = 'The current checked out combination, {0}, does not exist in the latest manifest for project, {1}\n'
 SYNC_REPO_CHANGE = 'The latest manifest for project, {0}, requires a change in currently cloned repositories.\nTo complete this operation please rerun the command with the --override flag\n' + SYNC_EXIT
 SYNC_SOURCE_MOVE_WARNING = '{}{}WARNING:{}{} {{}} being moved to {{}}'.format(Style.BRIGHT, Fore.RED, Style.RESET_ALL, Fore.RED)
 SYNC_REMOVE_WARNING = '{}{}WARNING:{}{} The following repos no longer exist in the new manifest and can no \nlonger be used for submitting code. Please manually delete the following \ndirectories after saving any work you have in them:'.format(Style.BRIGHT, Fore.RED, Style.RESET_ALL, Fore.RED)
@@ -130,7 +130,7 @@ ERROR_WRITING_INCLUDE = 'An error occured while writting the URL redirection con
 #Error messages for squash.py
 SQUASH_COMMON_ANCESTOR_REQUIRED = '{} is not in the same branch history as {}, unable to operate on this commit range.'
 
-# Messages for common_repo_functions.verify_manifest_data()
+# Messages for common_repo_functions.
 VERIFY_GLOBAL = 'Verifying the active projects in the global manifest repository\n'
 VERIFY_ARCHIVED = 'Verifying the archived projects in the global manifest repository\n'
 VERIFY_GLOBAL_FAIL = 'Unable to verify the contents of the global manifest repository\n'
-- 
2.16.2.windows.1


  parent reply	other threads:[~2020-05-11  0:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11  0:50 [edk2-staging/EdkRepo] [PATCH 0/4] EdkRepo: Finalize multiple manifest repository support Ashley E Desimone
2020-05-11  0:50 ` [edk2-stagin/EdkRepo] [PATCH 1/4] EdkRepo: Update sync to support multiple manifest repositories Ashley E Desimone
2020-05-11  0:50 ` Ashley E Desimone [this message]
2020-05-11  0:50 ` [edk2-staging/EdkRepo] [PATCH 3/4] EdkRepo: Add support for multiple manifest repostories to command completions Ashley E Desimone
2020-05-11  0:50 ` [edk2-staging/EdkRepo] [PATCH 4/4] EdkRepo: Remove support for deprecated Manifest-Repo content in edkrepo.cfg Ashley E Desimone
2020-05-11  6:10 ` [edk2-devel] [edk2-staging/EdkRepo] [PATCH 0/4] EdkRepo: Finalize multiple manifest repository support Nate DeSimone
2020-05-11  6:33 ` 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=20200511005026.23532-3-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