Commit Graph

13 Commits

Author SHA1 Message Date
Thomas Waldmann abe6545853
do not return the rc from Archiver methods
this is not needed and getting rid of it makes
the code / behaviour simpler to understand:

if a fatal error is detected, we throw an exception.

if we encounter something warning worthy, we emit and collect the warning.

in a few cases, we directly call set_ec to set the
exit code as needed, e.g. if passing it through
from a subprocess.

also:
- get rid of Archiver.exit_code
- assert that return value of archiver methods is None
- fix a print_warning call to use the correct formatting method
2024-02-17 22:07:47 +01:00
Thomas Waldmann 73284db53f
PATH: do not accept empty strings, fixes #4221 2024-01-02 19:17:55 +01:00
Tarrailt 616d5e7330
Add --format option to `borg diff`, resolve issue #4634 (#7534)
diff: add --format option

also: refactoring/improvements of BaseFormatter
2023-06-11 22:41:36 +02:00
Thomas Waldmann 9f4f2b42e3
implement BORG_<CMD>_FORMAT env vars, fixes #5166
for now for: prune, list, rlist.
2023-04-08 00:53:53 +02:00
Thomas Waldmann 644796ad6b
list: more Highlander options, fixes #6269 2023-04-06 17:44:07 +02: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 a475227e18
use archivename_validator everywhere
also: simplify, reuse code from text_validator.
2022-12-15 22:54:46 +01:00
Thomas Waldmann b9dc2be661
remove support for bpath placeholder
this needs to get done differently later, maybe base64 for json output.
2022-12-12 19:39:52 +01:00
Thomas Waldmann fa986a9f19 repoobj: add a layer to format/parse repo objects
borg < 2:

obj = encrypted(compressed(data))

borg 2:

obj = enc_meta_len32 + encrypted(msgpacked(meta)) + encrypted(compressed(data))

handle compr / decompr in repoobj

move the assert_id call from decrypt to RepoObj.parse

also:
- for AEADKeyBase, add a dummy assert_id (not needed here)
- only test assert_id for other if not AEADKeyBase instance
- remove test_getting_wrong_chunk. assert_id is called elsewhere
  and is not needed any more anyway with the new AEAD crypto.
- only give manifest (includes key, repo, repo_objs)
- only return manifest from Manifest.load (includes key, repo, repo_objs)
2022-09-04 00:49:38 +02:00
Thomas Waldmann 66e74e0471 archiver modules: rename to *_cmd[s]
this was already required for list_cmd (due to "list"
being a builtin), now renamed all else also.
2022-08-13 22:59:48 +02:00
Thomas Waldmann 9beaced33c move manifest module from helpers to borg.manifest 2022-08-13 21:55:12 +02:00
Thomas Waldmann e05f7971da move build_filter/build_matcher to archiver.common 2022-07-09 15:13:13 +02:00
Thomas Waldmann b959ff913a move list command to archiver.list_cmd
note: can't be named "archiver.list" due to collision with builtin type "list".
2022-07-09 15:13:13 +02:00
Renamed from src/borg/archiver/list.py (Browse further)