diff --git a/NEWS b/NEWS index 8fad15f4..e1977671 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/borgmatic/borg/create.py b/borgmatic/borg/create.py index 75baf667..a85f71ea 100644 --- a/borgmatic/borg/create.py +++ b/borgmatic/borg/create.py @@ -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) diff --git a/tests/unit/borg/test_create.py b/tests/unit/borg/test_create.py index d853e2d6..7a6d5e80 100644 --- a/tests/unit/borg/test_create.py +++ b/tests/unit/borg/test_create.py @@ -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',