-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EdkRepo: Update the Sync Command to Support Local Directory Renames and URL Changes #5
Conversation
Reset print formatting in SYNC_REMOVE_LIST_END_FORMATTING by changing it to Style.RESET_ALL Signed-off-by: Ashley E Desimone <[email protected]>
edkrepo/common/humble.py
Outdated
@@ -57,7 +57,12 @@ | |||
FETCHING = 'Fetching latest code for {0} from {1} branch ...' | |||
NO_SYNC_DETACHED_HEAD = 'No need to sync repo {0} since it is in detached HEAD state' | |||
SYNC_MANIFEST_UPDATE = 'To update to the latest manifest please run edkrepo sync --update-local-manifest. {}'.format(Fore.RESET) | |||
SYNC_REMOVE_LIST_END_FORMATTING = '{}'.format(Fore.RESET) | |||
SYNC_REMOVE_LIST_END_FORMATTING = '{}'.format(Style.RESET_ALL) | |||
SYNC_MOVE_FAILED = '''{}{}WARNING:{}{} Moving {{}} to {{}} failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make this a little more readable. Adding labels like {{old_dir}} and {{new_dir}} should make this much more readable.
edkrepo/commands/sync_command.py
Outdated
try: | ||
shutil.move(old_dir, new_dir) | ||
except: | ||
print(SYNC_MOVE_FAILED.format(source.root, new_dir, new_dir, new_dir, source.root)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the comment below, this would need to change to:
print(SYNC_MOVE_FAILED.format(old_dir=source.root, new_dir=new_dir))
…d/or URL changes Updated comments to better describe the process of updating the local manifest file. Removed the exception that was raised when a URL change was detected. Updated the calculation of sources_to_move, sources_to_remove and sources_to_clone so that the inital repository is moved to an archival location and the updated respository is cloned. Signed-off-by: Ashley E Desimone <[email protected]>
No description provided.