浏览代码

transfer: more Highlander options, fixes #6269

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

+ 3 - 1
src/borg/archiver/transfer_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 ..archive import Archive
 from ..archive import Archive
 from ..constants import *  # NOQA
 from ..constants import *  # NOQA
 from ..crypto.key import uses_same_id_hash, uses_same_chunker_secret
 from ..crypto.key import uses_same_id_hash, uses_same_chunker_secret
@@ -210,6 +210,7 @@ class TransferMixIn:
             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="transfer archives from the other repository",
             help="transfer archives from the other repository",
         )
         )
         subparser.add_argument(
         subparser.add_argument(
@@ -218,6 +219,7 @@ class TransferMixIn:
             dest="upgrader",
             dest="upgrader",
             type=str,
             type=str,
             default="NoOp",
             default="NoOp",
+            action=Highlander,
             help="use the upgrader to convert transferred data (default: no conversion)",
             help="use the upgrader to convert transferred data (default: no conversion)",
         )
         )
         define_archive_filters_group(subparser)
         define_archive_filters_group(subparser)