From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.4017.1589158230010710343 for ; Sun, 10 May 2020 17:50:30 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: ashley.e.desimone@intel.com) IronPort-SDR: yY/yrGwDOzEkD+HOADdW3SrHHI3No6nJRXFD6lLrFBBlvtTuivAqCxZvQzA75HvKWGjzGdQjwy AXghv1YkewTQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2020 17:50:29 -0700 IronPort-SDR: mcwqjwLV96WpKdaaIj95/s2xm0LN6dU6ZuhAZWm5DxrS/7XFCdjm1w0S5BhFsUlOq/r+XOPbvX 0kGbxXdT/s+w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,377,1583222400"; d="scan'208";a="296747715" Received: from aedesimo-desk.amr.corp.intel.com ([10.212.208.216]) by fmsmga002.fm.intel.com with ESMTP; 10 May 2020 17:50:29 -0700 From: "Ashley E Desimone" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Erik Bjorge , Bret Barkelew , Prince Agyeman 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 Message-Id: <20200511005026.23532-3-ashley.e.desimone@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20200511005026.23532-1-ashley.e.desimone@intel.com> References: <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 Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Bret Barkelew Cc: Prince Agyeman --- 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