2
0
Эх сурвалжийг харах

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

Dan Helfman 2 жил өмнө
parent
commit
c6582e1171

+ 2 - 0
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

+ 1 - 1
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)

+ 1 - 1
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',