浏览代码

rcreate: more Highlander options, fixes #6269

Thomas Waldmann 2 年之前
父节点
当前提交
21a3a95cc8
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/borg/archiver/rcreate_cmd.py

+ 4 - 1
src/borg/archiver/rcreate_cmd.py

@@ -1,6 +1,6 @@
 import argparse
 import argparse
 
 
-from ._common import with_repository, with_other_repository
+from ._common import with_repository, with_other_repository, Highlander
 from ..cache import Cache
 from ..cache import Cache
 from ..constants import *  # NOQA
 from ..constants import *  # NOQA
 from ..crypto.key import key_creator, key_argument_names, tam_required_file
 from ..crypto.key import key_creator, key_argument_names, tam_required_file
@@ -184,6 +184,7 @@ class RCreateMixIn:
             dest="other_location",
             dest="other_location",
             type=location_validator(other=True),
             type=location_validator(other=True),
             default=Location(other=True),
             default=Location(other=True),
+            action=Highlander,
             help="reuse the key material from the other repository",
             help="reuse the key material from the other repository",
         )
         )
         subparser.add_argument(
         subparser.add_argument(
@@ -193,6 +194,7 @@ class RCreateMixIn:
             dest="encryption",
             dest="encryption",
             required=True,
             required=True,
             choices=key_argument_names(),
             choices=key_argument_names(),
+            action=Highlander,
             help="select encryption key mode **(required)**",
             help="select encryption key mode **(required)**",
         )
         )
         subparser.add_argument(
         subparser.add_argument(
@@ -210,6 +212,7 @@ class RCreateMixIn:
             dest="storage_quota",
             dest="storage_quota",
             default=None,
             default=None,
             type=parse_storage_quota,
             type=parse_storage_quota,
+            action=Highlander,
             help="Set storage quota of the new repository (e.g. 5G, 1.5T). Default: no quota.",
             help="Set storage quota of the new repository (e.g. 5G, 1.5T). Default: no quota.",
         )
         )
         subparser.add_argument(
         subparser.add_argument(