diff --git a/setup_docs.py b/setup_docs.py index 609fcd3fa..0120f0d68 100644 --- a/setup_docs.py +++ b/setup_docs.py @@ -288,7 +288,6 @@ class build_man(Command): 'break-lock': 'lock', 'with-lock': 'lock', - 'change-passphrase': 'key', 'key_change-passphrase': 'key', 'key_export': 'key', 'key_import': 'key', diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 44ccc6df0..49827faaa 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -306,11 +306,6 @@ def do_change_passphrase(self, args, repository, manifest, key): logger.info('Key location: %s', key.find_key()) return EXIT_SUCCESS - def do_change_passphrase_deprecated(self, args): - logger.warning('"borg change-passphrase" is deprecated and will be removed in Borg 1.2.\n' - 'Use "borg key change-passphrase" instead.') - return self.do_change_passphrase(args) - @with_repository(lock=False, exclusive=False, manifest=False, cache=False) def do_key_export(self, args, repository): """Export the repository key for backup""" @@ -2925,16 +2920,6 @@ def define_archive_filters_group(subparser, *, sort_by=True, first_last=True): subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='', type=location_validator(archive=False)) - # Borg 1.0 alias for change passphrase (without the "key" subcommand) - subparser = subparsers.add_parser('change-passphrase', parents=[common_parser], add_help=False, - description=self.do_change_passphrase.__doc__, - epilog=change_passphrase_epilog, - formatter_class=argparse.RawDescriptionHelpFormatter, - help='change repository passphrase') - subparser.set_defaults(func=self.do_change_passphrase_deprecated) - subparser.add_argument('location', metavar='REPOSITORY', nargs='?', default='', - type=location_validator(archive=False)) - migrate_to_repokey_epilog = process_epilog(""" This command migrates a repository from passphrase mode (removed in Borg 1.0) to repokey mode. diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py index 5bc5c1e82..b131b7492 100644 --- a/src/borg/testsuite/archiver.py +++ b/src/borg/testsuite/archiver.py @@ -1555,7 +1555,7 @@ def test_unknown_feature_on_cache_sync(self): def test_unknown_feature_on_change_passphrase(self): print(self.cmd('init', '--encryption=repokey', self.repository_location)) self.add_unknown_feature(Manifest.Operation.CHECK) - self.cmd_raises_unknown_feature(['change-passphrase', self.repository_location]) + self.cmd_raises_unknown_feature(['key', 'change-passphrase', self.repository_location]) def test_unknown_feature_on_read(self): print(self.cmd('init', '--encryption=repokey', self.repository_location)) @@ -2082,7 +2082,7 @@ def test_change_passphrase(self): self.cmd('init', '--encryption=repokey', self.repository_location) os.environ['BORG_NEW_PASSPHRASE'] = 'newpassphrase' # here we have both BORG_PASSPHRASE and BORG_NEW_PASSPHRASE set: - self.cmd('change-passphrase', self.repository_location) + self.cmd('key', 'change-passphrase', self.repository_location) os.environ['BORG_PASSPHRASE'] = 'newpassphrase' self.cmd('list', self.repository_location) @@ -2885,7 +2885,7 @@ def test_detect_attic_repo(self): ['info', path + '::test'], ['key', 'export', path, 'exported'], ['key', 'import', path, 'import'], - ['change-passphrase', path], + ['key', 'change-passphrase', path], ['break-lock', path], ] for args in cmds: