Internally support new Borg 2.0.0b5 "--filter" status characters / item flags for the "create" action.

This commit is contained in:
Dan Helfman 2023-02-26 17:17:25 -08:00
parent 9b83afe491
commit c6582e1171
3 changed files with 4 additions and 2 deletions

2
NEWS
View file

@ -2,6 +2,8 @@
* #621: Add optional authentication to the ntfy monitoring hook.
* With the "create" action, only one of "--list" ("--files") and "--progress" flags can be used.
This lines up with the new behavior in Borg 2.0.0b5.
* Internally support new Borg 2.0.0b5 "--filter" status characters / item flags for the "create"
action.
1.7.7
* #642: Add MySQL database hook "add_drop_database" configuration option to control whether dumped

View file

@ -399,7 +399,7 @@ def create_archive(
+ (('--remote-path', remote_path) if remote_path else ())
+ (('--umask', str(umask)) if umask else ())
+ (('--lock-wait', str(lock_wait)) if lock_wait else ())
+ (('--list', '--filter', 'AMEx-') if list_files and not json and not progress else ())
+ (('--list', '--filter', 'AMEx+-') if list_files and not json and not progress else ())
+ (('--dry-run',) if dry_run else ())
+ (tuple(extra_borg_options.split(' ')) if extra_borg_options else ())
+ flags.make_repository_archive_flags(repository, archive_name_format, local_borg_version)

View file

@ -1612,7 +1612,7 @@ def test_create_archive_with_files_calls_borg_with_list_parameter_and_answer_out
)
flexmock(module.environment).should_receive('make_environment')
flexmock(module).should_receive('execute_command').with_args(
('borg', 'create', '--list', '--filter', 'AMEx-') + REPO_ARCHIVE_WITH_PATHS,
('borg', 'create', '--list', '--filter', 'AMEx+-') + REPO_ARCHIVE_WITH_PATHS,
output_log_level=module.borgmatic.logger.ANSWER,
output_file=None,
borg_local_path='borg',