Skip to content

legacy: extract LegacyArchives into legacy/archives.py, add ArchivesInterface, refs #9556#9639

Open
mr-raj12 wants to merge 1 commit into
borgbackup:masterfrom
mr-raj12:master
Open

legacy: extract LegacyArchives into legacy/archives.py, add ArchivesInterface, refs #9556#9639
mr-raj12 wants to merge 1 commit into
borgbackup:masterfrom
mr-raj12:master

Conversation

@mr-raj12
Copy link
Copy Markdown
Contributor

@mr-raj12 mr-raj12 commented May 13, 2026

Moves the Borg 1.x archive list management out of Archives and into LegacyArchives, refs #9556.

  • LegacyArchives extracted from Archives into legacy/archives.py
  • Archives in manifest.py is now 2.x only as all self.legacy branches removed
  • ArchivesInterface added to manifest.py as a @runtime_checkable Protocol as mypy/pyright will catch drift between the two implementations
  • Manifest.__init__ picks LegacyArchives or Archives based on repository type via lazy imports

No logic changes. borg transfer --from-borg1 and borg serve (v1 clients) keep working through borg.legacy.archives.

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 13, 2026

Codecov Report

❌ Patch coverage is 48.07692% with 108 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.97%. Comparing base (de0f7ac) to head (bf756da).
⚠️ Report is 21 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/borg/legacy/archives.py 47.97% 67 Missing and 10 partials ⚠️
src/borg/manifest.py 48.33% 9 Missing and 22 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9639      +/-   ##
==========================================
- Coverage   83.31%   82.97%   -0.35%     
==========================================
  Files          89       90       +1     
  Lines       15549    15673     +124     
  Branches     2343     2374      +31     
==========================================
+ Hits        12955    13005      +50     
- Misses       1838     1889      +51     
- Partials      756      779      +23     

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

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.

1 participant