Skip to content

legacy: move upgrade.py into borg.legacy, refs #9556#9655

Merged
ThomasWaldmann merged 1 commit into
borgbackup:masterfrom
mr-raj12:legacy-upgrade-phase5
May 22, 2026
Merged

legacy: move upgrade.py into borg.legacy, refs #9556#9655
ThomasWaldmann merged 1 commit into
borgbackup:masterfrom
mr-raj12:legacy-upgrade-phase5

Conversation

@mr-raj12
Copy link
Copy Markdown
Contributor

Description

Moves UpgraderNoOp and UpgraderFrom12To20 into borg.legacy, refs #9556.

  • src/borg/upgrade.pysrc/borg/legacy/upgrade.py
  • Relative imports updated from .X to ..X
  • transfer_cmd.py: from .. import upgrade as upgrade_modfrom ..legacy import upgrade as upgrade_mod

No logic changes. Both classes are Borg 1.x-only. Leaving them at the package root means an extra file to track down when v1 support is dropped; in borg.legacy it goes away with the rest.

Refs #9556

Checklist

  • PR is against master
  • New code has tests
  • Tests pass
  • Commit message references related issue

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 71.11111% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.00%. Comparing base (da0a2ff) to head (b0f3096).
⚠️ Report is 24 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/borg/legacy/upgrade.py 70.11% 15 Missing and 11 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9655      +/-   ##
==========================================
- Coverage   83.08%   83.00%   -0.09%     
==========================================
  Files          90       90              
  Lines       15653    15549     -104     
  Branches     2356     2340      -16     
==========================================
- Hits        13006    12907      -99     
  Misses       1887     1887              
+ Partials      760      755       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ThomasWaldmann
Copy link
Copy Markdown
Member

UpgraderFrom12To20 - that is for borg 1.x (at that time it was 1.2, meanwhile it is 1.4).

The NoOp upgrader is not legacy, it is used when transferring archives from borg2 -> borg2 repos. Not really an upgrade, rather moving stuff.

@mr-raj12 mr-raj12 force-pushed the legacy-upgrade-phase5 branch from a3dacdc to b0f3096 Compare May 22, 2026 12:08
Copy link
Copy Markdown
Member

@ThomasWaldmann ThomasWaldmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (I assume you just moved the 12to20 code and you didn't change it).

@ThomasWaldmann ThomasWaldmann merged commit 985d6f0 into borgbackup:master May 22, 2026
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants