mirror of https://github.com/borgbackup/borg.git
remove deprecated "--hourly/daily/weekly/monthly/yearly"
use --keep-hourly/daily/weekly/monthly/yearly instead note: kept the code and test, we might have deprecated option in future, too
This commit is contained in:
parent
079646ee4c
commit
ad31fcd7c0
|
@ -747,11 +747,7 @@ class Archiver:
|
|||
|
||||
def preprocess_args(self, args):
|
||||
deprecations = [
|
||||
('--hourly', '--keep-hourly', 'Warning: "--hourly" has been deprecated. Use "--keep-hourly" instead.'),
|
||||
('--daily', '--keep-daily', 'Warning: "--daily" has been deprecated. Use "--keep-daily" instead.'),
|
||||
('--weekly', '--keep-weekly', 'Warning: "--weekly" has been deprecated. Use "--keep-weekly" instead.'),
|
||||
('--monthly', '--keep-monthly', 'Warning: "--monthly" has been deprecated. Use "--keep-monthly" instead.'),
|
||||
('--yearly', '--keep-yearly', 'Warning: "--yearly" has been deprecated. Use "--keep-yearly" instead.'),
|
||||
#('--old', '--new', 'Warning: "--old" has been deprecated. Use "--new" instead.'),
|
||||
]
|
||||
for i, arg in enumerate(args[:]):
|
||||
for old_name, new_name, warning in deprecations:
|
||||
|
|
|
@ -822,12 +822,12 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
|||
output = self.cmd('create', '-v', '--list', '--filter=AM', self.repository_location + '::test3', 'input')
|
||||
self.assert_in('file1', output)
|
||||
|
||||
def test_cmdline_compatibility(self):
|
||||
self.create_regular_file('file1', size=1024 * 80)
|
||||
self.cmd('init', self.repository_location)
|
||||
self.cmd('create', self.repository_location + '::test', 'input')
|
||||
output = self.cmd('prune', self.repository_location, '--hourly=1')
|
||||
self.assert_in('"--hourly" has been deprecated. Use "--keep-hourly" instead', output)
|
||||
#def test_cmdline_compatibility(self):
|
||||
# self.create_regular_file('file1', size=1024 * 80)
|
||||
# self.cmd('init', self.repository_location)
|
||||
# self.cmd('create', self.repository_location + '::test', 'input')
|
||||
# output = self.cmd('foo', self.repository_location, '--old')
|
||||
# self.assert_in('"--old" has been deprecated. Use "--new" instead', output)
|
||||
|
||||
def test_prune_repository(self):
|
||||
self.cmd('init', self.repository_location)
|
||||
|
|
Loading…
Reference in New Issue