Skip to content
Snippets Groups Projects
Unverified Commit 3ead8f88 authored by Oliver Smith's avatar Oliver Smith
Browse files

migrate_work_folder: print suffix in migration msg (MR 2460)

parent 60cae581
No related branches found
No related tags found
1 merge request!2460migrate_work_folder: print suffix "-2.x" and skip updating the git URL twice
Pipeline #209069 passed
......@@ -83,12 +83,14 @@ def migrate_work_folder():
context = get_context()
current = 0
suffix: str | None = None
current_with_suffix = ""
path = context.config.work / "version"
if os.path.exists(path):
with open(path) as f:
# pmb 2.3.x added a suffix due to conflicting work versions
# We need to be able to handle that going forward
version_parts = f.read().rstrip().split("-")
current_with_suffix = f.read().rstrip()
version_parts = current_with_suffix.split("-")
current = int(version_parts[0])
if len(version_parts) == 2:
suffix = version_parts[1]
......@@ -99,7 +101,7 @@ def migrate_work_folder():
return
logging.info(
"WARNING: Your work folder version needs to be migrated"
" (from version " + str(current) + " to " + str(required) + ")!"
f" (from version {current_with_suffix} to {required})!"
)
# version 6 and version 7 from 2.3.x branch are equivalent for this and we need to migrate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment