legacy: split borg 1.x directory resolution into borg.legacy.fs#9822
Open
mr-raj12 wants to merge 1 commit into
Open
legacy: split borg 1.x directory resolution into borg.legacy.fs#9822mr-raj12 wants to merge 1 commit into
mr-raj12 wants to merge 1 commit into
Conversation
helpers.fs keeps only the borg2 layout; the v1 home/config/cache/keys/security dir logic now lives in legacy.fs. Part of borgbackup#9556.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9822 +/- ##
==========================================
- Coverage 84.94% 84.87% -0.08%
==========================================
Files 92 93 +1
Lines 15291 15328 +37
Branches 2296 2302 +6
==========================================
+ Hits 12989 13009 +20
- Misses 1611 1624 +13
- Partials 691 695 +4 ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
helpers.fs used to take a legacy= flag on every directory function to pick between the borg2 layout and the old borg 1.x one. This drops the flag. The borg2 functions keep just the borg2 behaviour, and the borg 1.x home/base, config, cache, keys and security dir logic moves into a new module, borg.legacy.fs.
borg.security is the only production code left that needs the v1 layout. It goes through a small _security_dir(repository) helper that imports legacy.fs lazily, and only when repository.version == 1, so a borg2 repo never touches the legacy package at all.
The dir-resolution tests that used to drive the flag move to testsuite/legacy_fs_test.py, where they check the modern and v1 results agree where they should. Part of #9556.
Checklist