Thomas Waldmann
d9875a4d7e
improve test_get_security_dir
2023-02-04 18:23:35 +01:00
Thomas Waldmann
078bb7ee02
improve test_get_keys_dir
2023-02-04 18:19:15 +01:00
Thomas Waldmann
6ab424598d
improve test_get_cache_dir
2023-02-04 18:17:43 +01:00
Thomas Waldmann
4bacd0b722
improve test_get_config_dir
2023-02-04 18:15:57 +01:00
Thomas Waldmann
bb73e8682f
fix win2 typo
2023-02-04 18:11:28 +01:00
Thomas Waldmann
499e5133b5
test_config_dir_compat: don't test on win32
...
there is no old borg < 2.0 there anyway.
2023-02-04 01:18:16 +01:00
Thomas Waldmann
bde0f11e1e
get_security_dir: legacy=False default
2023-02-04 00:35:04 +01:00
Thomas Waldmann
1d4810af23
get_keys_dir: legacy=False default
2023-02-04 00:35:03 +01:00
Thomas Waldmann
b06dd1c66c
get_config_dir: legacy=False default
2023-02-04 00:35:01 +01:00
Thomas Waldmann
ebcda6f0a5
get_cache_dir: legacy=False default
2023-02-04 00:34:57 +01:00
Thomas Waldmann
424be763b2
get_base_dir: legacy=False default
2023-02-04 00:34:54 +01:00
Thomas Waldmann
81595a9ca0
conftest.py: use BORG_BASE_DIR to redirect borg testing .config/.cache into a temp dir
...
XDG_*_HOME is not honoured on macOS and on Windows if we use platformdirs.
2023-02-04 00:34:52 +01:00
Thomas Waldmann
fddf6afded
get_*_dir: make legacy=... kwarg only
...
it's better readable.
2023-02-04 00:34:45 +01:00
Thomas Waldmann
437b5fa859
do not fail on macOS due to different dirs from platformdirs
2023-02-04 00:34:42 +01:00
Thomas Waldmann
8379ecefaa
deal with BORG_BASE_DIR
2023-02-04 00:34:26 +01:00
Thomas Waldmann
d3d909ad31
add compatibility test: legacy vs. non-legacy platformdirs
2023-02-03 18:22:51 +01:00
Rayyan Ansari
6c7efbe128
add platformdirs to dependencies
2023-02-03 17:46:56 +01:00
Rayyan Ansari
f2452aef2a
helpers: use platformdirs on win32
2023-02-03 17:46:49 +01:00
TW
7ffd87739b
Merge pull request #7320 from ThomasWaldmann/transfer-progress
...
Transfer progress
2023-02-03 03:06:32 +01:00
Thomas Waldmann
7ad25ba9e2
transfer: support --progress
2023-02-03 02:10:29 +01:00
TW
63a0b3bed4
Merge pull request #7310 from ThomasWaldmann/avoid-orphan-content-chunks2
...
avoid orphan content chunks on BackupOSErrors
2023-02-03 02:08:49 +01:00
TW
c96c5652b0
Merge pull request #7317 from pgerber/hanging-test
...
Fix test hanging reading FIFO when `borg create` failed
2023-02-03 01:59:15 +01:00
Thomas Waldmann
ffe32316a5
avoid orphan content chunks on BackupOSError, fixes #6709
...
if we run into some issue reading an input file, e.g. an I/O error,
the BackupOSError exception raised due to that will skip the current
file and no archive item will be created for this file.
But we maybe have already added some of its content chunks to the repo,
we have either written them as new chunks or incref'd some identical chunk
in the repo.
Added an exception handler that decrefs (and deletes if refcount reaches 0)
these chunks again before re-raising the exception, so the repo is in a
consistent state again and we do not have orphaned content chunks in the repo.
2023-02-03 01:35:12 +01:00
TW
9b7647c89d
Merge pull request #7309 from ThomasWaldmann/no-part-files-in-final-archive
...
remove part files from final archive
2023-02-03 01:33:47 +01:00
Peter Gerber
8ce3d22358
Fix test hanging reading FIFO when borg create
failed
2023-02-02 00:44:08 +01:00
TW
f25f6a8e33
Merge pull request #7315 from ThomasWaldmann/pythonioencoding
...
document another way to get UTF-8 encoding on stdin/stdout/stderr, fixes #2273
2023-02-02 00:35:21 +01:00
TW
6d53cd0365
Merge pull request #7316 from ThomasWaldmann/gh-fixed-black-version
...
fix black versions be 23.x
2023-02-02 00:34:08 +01:00
Thomas Waldmann
f65a6b197a
fix black versions be 23.x
...
https://black.readthedocs.io/en/stable/integrations/github_actions.html
2023-02-01 16:04:39 +01:00
Thomas Waldmann
856d98c72f
document another way to get UTF-8 encoding on stdin/stdout/stderr, fixes #2273
2023-02-01 15:32:29 +01:00
Thomas Waldmann
d2cc167afd
borg transfer: drop part files
2023-02-01 13:04:19 +01:00
Thomas Waldmann
b92f4aa487
remove --consider-part-files, related stats code, update docs
...
we now just treat that one .borg_part file we might have inside
checkpoint archives as a normal file.
people can recognize via the file name it is a partial file.
nobody cares for statistics of checkpoint files and the final
archive now does not contain any partial files any more, thus
no needs to maintain statistics about count and size of part
files.
2023-02-01 13:04:18 +01:00
Thomas Waldmann
0fed44110a
remove part files from final archive
...
checkpoint archives might have a single, incomplete part file as last item.
part files are always a prefix of the full file, growing in size from
checkpoint to checkpoint.
we now manage the archive items metadata stream in a special way:
- checkpoint archive A(n) might end with a partial item PI(n)
- checkpoint archive A(n+1) does not contain PI(n)
- checkpoint archive A(n+1) contains a new partial item PI(n+1)
- the final archive does not contain any partial items
2023-02-01 13:04:12 +01:00
TW
4515884af5
Merge pull request #7314 from ThomasWaldmann/newer-black
...
use latest "black"
2023-02-01 13:02:41 +01:00
Thomas Waldmann
a0330d578e
run black 23.1.0 on the code
2023-02-01 12:30:37 +01:00
Thomas Waldmann
96862787db
upgrade black to 23.1.0
...
work around the current github actions issue by just using the latest version:
https://github.com/psf/black/issues/3538
2023-02-01 12:29:54 +01:00
Michael Deyaso
8af9eb47c2
Added date-matching support for list_considering ( #7306 )
...
added date-matching support for list_considering, fixes #7296
Co-authored-by: Michael Deyaso <mdeyaso@fusioniq.io>
2023-02-01 11:32:53 +01:00
TW
8046d6f575
Merge pull request #7311 from ThomasWaldmann/fix-mac-birthtime-test-fail
...
tests: relax birthtime assertion, fixes #7308
2023-02-01 11:25:55 +01:00
Thomas Waldmann
e019487166
tests: relax birthtime assertion, fixes #7308
2023-02-01 01:59:41 +01:00
TW
d0344cb8f8
Merge pull request #7305 from ThomasWaldmann/volume-based-checkpointing
...
volume based checkpointing, fix item_ptrs orphaned chunks
2023-01-31 16:48:49 +01:00
TW
2472b1c63f
Merge pull request #7303 from ThomasWaldmann/fix-pyi
...
mypy inspired fixes / updates
2023-01-31 15:46:20 +01:00
Thomas Waldmann
15d1bc0c49
fix checkpointing: add item_ptrs chunks cleanup
...
not having this had created orphaned item_ptrs chunks for checkpoint archives.
also:
- borg check: show id of orphaned chunks
- borg check: archive list with explicit consider_checkpoints=True (this is the default, but better make sure).
2023-01-31 14:40:41 +01:00
Thomas Waldmann
7e31fab754
cleanup: remove Archive.checkpoint_interval (not used)
...
checkpoint_interval and checkpoint_volume are only needed for
the ChunksProcessor.
2023-01-31 04:01:39 +01:00
Thomas Waldmann
56b6f1d2e0
create/recreate/import-tar: add --checkpoint-volume option
...
volume based checkpointing is easier to test than its time based cousin.
also added first checkpointing test.
2023-01-31 04:01:37 +01:00
Thomas Waldmann
2705ccb59b
key storage: type hints / cleanup
2023-01-30 18:08:05 +01:00
Thomas Waldmann
360cd8488f
micro-opt: construct borg1_header_fmt Struct only once
2023-01-30 17:56:05 +01:00
Thomas Waldmann
e772d70e05
cleaner FileLikeWrapper with own __init__
2023-01-30 15:54:56 +01:00
Thomas Waldmann
9740767449
fix bug in obfuscated data upgrade code
2023-01-30 15:54:54 +01:00
Thomas Waldmann
f9078ebfa9
FlexiKey: define STORAGE in base class
...
avoids some mypy warnings.
2023-01-30 15:54:52 +01:00
Thomas Waldmann
a863249394
fs.py: fix bug in f-string - thanks mypy!
2023-01-30 15:54:50 +01:00
Thomas Waldmann
90a9a124d4
*.pyi: fix types, add missing attrs
2023-01-30 15:54:48 +01:00