Переглянути джерело

remove deprecated option: --keep-tag-files

replaced by: --keep-exclude-tags
Thomas Waldmann 6 роки тому
батько
коміт
933e82a49c
2 змінених файлів з 1 додано та 7 видалено
  1. 1 2
      src/borg/archiver.py
  2. 0 5
      src/borg/testsuite/archiver.py

+ 1 - 2
src/borg/archiver.py

@@ -2267,7 +2267,6 @@ class Archiver:
         deprecations = [
             # ('--old', '--new' or None, 'Warning: "--old" has been deprecated. Use "--new" instead.'),
             ('--list-format', '--format', 'Warning: "--list-format" has been deprecated. Use "--format" instead.'),
-            ('--keep-tag-files', '--keep-exclude-tags', 'Warning: "--keep-tag-files" has been deprecated. Use "--keep-exclude-tags" instead.'),
             ('--ignore-inode', None, 'Warning: "--ignore-inode" has been deprecated. Use "--files-cache=ctime,size" or "...=mtime,size" instead.'),
             ('--no-files-cache', None, 'Warning: "--no-files-cache" has been deprecated. Use "--files-cache=disabled" instead.'),
         ]
@@ -2488,7 +2487,7 @@ class Archiver:
                            action='append', type=str,
                            help='exclude directories that are tagged by containing a filesystem object with '
                                 'the given NAME')
-                add_option('--keep-exclude-tags', '--keep-tag-files', dest='keep_exclude_tags',
+                add_option('--keep-exclude-tags', dest='keep_exclude_tags',
                            action='store_true',
                            help='if tag objects are specified with ``--exclude-if-present``, '
                                 'don\'t omit the tag objects themselves from the backup archive')

+ 0 - 5
src/borg/testsuite/archiver.py

@@ -1203,11 +1203,6 @@ class ArchiverTestCase(ArchiverTestCaseBase):
         self.assert_equal(sorted(os.listdir('output/input/taggedall')),
                           ['.NOBACKUP1', '.NOBACKUP2', CACHE_TAG_NAME, ])
 
-    def test_exclude_keep_tagged_deprecation(self):
-        self.cmd('init', '--encryption=repokey', self.repository_location)
-        output_warn = self.cmd('create', '--exclude-caches', '--keep-tag-files', self.repository_location + '::test', src_dir)
-        self.assert_in('--keep-tag-files" has been deprecated.', output_warn)
-
     def test_exclude_keep_tagged(self):
         self._create_test_keep_tagged()
         self.cmd('create', '--exclude-if-present', '.NOBACKUP1', '--exclude-if-present', '.NOBACKUP2',