Browse Source

borg dump-archive NAME / dump-archive-items NAME

Thomas Waldmann 3 years ago
parent
commit
1ed7e5b292
2 changed files with 4 additions and 4 deletions
  1. 2 2
      src/borg/archiver.py
  2. 2 2
      src/borg/testsuite/archiver.py

+ 2 - 2
src/borg/archiver.py

@@ -3952,7 +3952,7 @@ class Archiver:
                                           formatter_class=argparse.RawDescriptionHelpFormatter,
                                           formatter_class=argparse.RawDescriptionHelpFormatter,
                                           help='dump archive items (metadata) (debug)')
                                           help='dump archive items (metadata) (debug)')
         subparser.set_defaults(func=self.do_debug_dump_archive_items)
         subparser.set_defaults(func=self.do_debug_dump_archive_items)
-        subparser.add_argument('--name', dest='name', metavar='NAME', type=NameSpec,
+        subparser.add_argument('name', metavar='NAME', type=NameSpec,
                                help='specify the archive name')
                                help='specify the archive name')
 
 
         debug_dump_archive_epilog = process_epilog("""
         debug_dump_archive_epilog = process_epilog("""
@@ -3964,7 +3964,7 @@ class Archiver:
                                           formatter_class=argparse.RawDescriptionHelpFormatter,
                                           formatter_class=argparse.RawDescriptionHelpFormatter,
                                           help='dump decoded archive metadata (debug)')
                                           help='dump decoded archive metadata (debug)')
         subparser.set_defaults(func=self.do_debug_dump_archive)
         subparser.set_defaults(func=self.do_debug_dump_archive)
-        subparser.add_argument('--name', dest='name', metavar='NAME', type=NameSpec,
+        subparser.add_argument('name', metavar='NAME', type=NameSpec,
                                help='specify the archive name')
                                help='specify the archive name')
         subparser.add_argument('path', metavar='PATH', type=str,
         subparser.add_argument('path', metavar='PATH', type=str,
                                help='file to dump data into')
                                help='file to dump data into')

+ 2 - 2
src/borg/testsuite/archiver.py

@@ -2804,7 +2804,7 @@ class ArchiverTestCase(ArchiverTestCaseBase):
         self.cmd(f'--repo={self.repository_location}', 'init', '--encryption=repokey')
         self.cmd(f'--repo={self.repository_location}', 'init', '--encryption=repokey')
         self.cmd(f'--repo={self.repository_location}', 'create', 'test', 'input')
         self.cmd(f'--repo={self.repository_location}', 'create', 'test', 'input')
         with changedir('output'):
         with changedir('output'):
-            output = self.cmd(f'--repo={self.repository_location}', 'debug', 'dump-archive-items', '--name=test')
+            output = self.cmd(f'--repo={self.repository_location}', 'debug', 'dump-archive-items', 'test')
         output_dir = sorted(os.listdir('output'))
         output_dir = sorted(os.listdir('output'))
         assert len(output_dir) > 0 and output_dir[0].startswith('000000_')
         assert len(output_dir) > 0 and output_dir[0].startswith('000000_')
         assert 'Done.' in output
         assert 'Done.' in output
@@ -3283,7 +3283,7 @@ id: 2 / e29442 3506da 4e1ea7 / 25f62a 5a3d41 - 02
         self.cmd(f'--repo={self.repository_location}', 'init', '--encryption=repokey')
         self.cmd(f'--repo={self.repository_location}', 'init', '--encryption=repokey')
         self.cmd(f'--repo={self.repository_location}', 'create', 'test', 'input')
         self.cmd(f'--repo={self.repository_location}', 'create', 'test', 'input')
         dump_file = self.output_path + '/dump'
         dump_file = self.output_path + '/dump'
-        output = self.cmd(f'--repo={self.repository_location}', 'debug', 'dump-archive', '--name=test', dump_file)
+        output = self.cmd(f'--repo={self.repository_location}', 'debug', 'dump-archive', 'test', dump_file)
         assert output == ""
         assert output == ""
         with open(dump_file) as f:
         with open(dump_file) as f:
             result = json.load(f)
             result = json.load(f)