From 37ae34a432483d1af1a33032113c568954b588c3 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sat, 26 Aug 2017 16:07:30 -0700 Subject: [PATCH] When pruning, make highest verbosity level list archives kept and pruned. --- NEWS | 4 ++++ borgmatic/borg/prune.py | 2 +- borgmatic/tests/unit/borg/test_prune.py | 2 +- setup.py | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 66447b2..677aec6 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +1.1.7.dev0 + + * When pruning, make highest verbosity level list archives kept and pruned. + 1.1.6 * #12, #35: Support for Borg --exclude-from, --exclude-caches, and --exclude-if-present options. diff --git a/borgmatic/borg/prune.py b/borgmatic/borg/prune.py index 8f52cb4..7f0c038 100644 --- a/borgmatic/borg/prune.py +++ b/borgmatic/borg/prune.py @@ -33,7 +33,7 @@ def prune_archives(verbosity, repository, retention_config, remote_path=None): remote_path_flags = ('--remote-path', remote_path) if remote_path else () verbosity_flags = { VERBOSITY_SOME: ('--info', '--stats',), - VERBOSITY_LOTS: ('--debug', '--stats'), + VERBOSITY_LOTS: ('--debug', '--stats', '--list'), }.get(verbosity, ()) full_command = ( diff --git a/borgmatic/tests/unit/borg/test_prune.py b/borgmatic/tests/unit/borg/test_prune.py index 379960a..ffcf32a 100644 --- a/borgmatic/tests/unit/borg/test_prune.py +++ b/borgmatic/tests/unit/borg/test_prune.py @@ -70,7 +70,7 @@ def test_prune_archives_with_verbosity_lots_should_call_borg_with_debug_paramete flexmock(module).should_receive('_make_prune_flags').with_args(retention_config).and_return( BASE_PRUNE_FLAGS, ) - insert_subprocess_mock(PRUNE_COMMAND + ('--debug', '--stats',)) + insert_subprocess_mock(PRUNE_COMMAND + ('--debug', '--stats', '--list')) module.prune_archives( repository='repo', diff --git a/setup.py b/setup.py index a842ab5..f70e334 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages -VERSION = '1.1.6' +VERSION = '1.1.7.dev0' setup(