Browse Source

create: more Highlander options, fixes #6269

Thomas Waldmann 2 years ago
parent
commit
645b0088c5
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/borg/archiver/create_cmd.py

+ 10 - 0
src/borg/archiver/create_cmd.py

@@ -763,6 +763,7 @@ class CreateMixIn:
             metavar="NAME",
             metavar="NAME",
             dest="stdin_name",
             dest="stdin_name",
             default="stdin",
             default="stdin",
+            action=Highlander,
             help="use NAME in archive for stdin data (default: %(default)r)",
             help="use NAME in archive for stdin data (default: %(default)r)",
         )
         )
         subparser.add_argument(
         subparser.add_argument(
@@ -770,6 +771,7 @@ class CreateMixIn:
             metavar="USER",
             metavar="USER",
             dest="stdin_user",
             dest="stdin_user",
             default=None,
             default=None,
+            action=Highlander,
             help="set user USER in archive for stdin data (default: do not store user/uid)",
             help="set user USER in archive for stdin data (default: do not store user/uid)",
         )
         )
         subparser.add_argument(
         subparser.add_argument(
@@ -777,6 +779,7 @@ class CreateMixIn:
             metavar="GROUP",
             metavar="GROUP",
             dest="stdin_group",
             dest="stdin_group",
             default=None,
             default=None,
+            action=Highlander,
             help="set group GROUP in archive for stdin data (default: do not store group/gid)",
             help="set group GROUP in archive for stdin data (default: do not store group/gid)",
         )
         )
         subparser.add_argument(
         subparser.add_argument(
@@ -785,6 +788,7 @@ class CreateMixIn:
             dest="stdin_mode",
             dest="stdin_mode",
             type=lambda s: int(s, 8),
             type=lambda s: int(s, 8),
             default=STDIN_MODE_DEFAULT,
             default=STDIN_MODE_DEFAULT,
+            action=Highlander,
             help="set mode to M in archive for stdin data (default: %(default)04o)",
             help="set mode to M in archive for stdin data (default: %(default)04o)",
         )
         )
         subparser.add_argument(
         subparser.add_argument(
@@ -804,6 +808,7 @@ class CreateMixIn:
         )
         )
         subparser.add_argument(
         subparser.add_argument(
             "--paths-delimiter",
             "--paths-delimiter",
+            action=Highlander,
             metavar="DELIM",
             metavar="DELIM",
             help="set path delimiter for ``--paths-from-stdin`` and ``--paths-from-command`` (default: \\n) ",
             help="set path delimiter for ``--paths-from-stdin`` and ``--paths-from-command`` (default: \\n) ",
         )
         )
@@ -878,6 +883,7 @@ class CreateMixIn:
             dest="comment",
             dest="comment",
             type=comment_validator,
             type=comment_validator,
             default="",
             default="",
+            action=Highlander,
             help="add a comment text to the archive",
             help="add a comment text to the archive",
         )
         )
         archive_group.add_argument(
         archive_group.add_argument(
@@ -886,6 +892,7 @@ class CreateMixIn:
             dest="timestamp",
             dest="timestamp",
             type=timestamp,
             type=timestamp,
             default=None,
             default=None,
+            action=Highlander,
             help="manually specify the archive creation date/time (yyyy-mm-ddThh:mm:ss[(+|-)HH:MM] format, "
             help="manually specify the archive creation date/time (yyyy-mm-ddThh:mm:ss[(+|-)HH:MM] format, "
             "(+|-)HH:MM is the UTC offset, default: local time zone). Alternatively, give a reference file/directory.",
             "(+|-)HH:MM is the UTC offset, default: local time zone). Alternatively, give a reference file/directory.",
         )
         )
@@ -896,6 +903,7 @@ class CreateMixIn:
             dest="checkpoint_interval",
             dest="checkpoint_interval",
             type=int,
             type=int,
             default=1800,
             default=1800,
+            action=Highlander,
             help="write checkpoint every SECONDS seconds (Default: 1800)",
             help="write checkpoint every SECONDS seconds (Default: 1800)",
         )
         )
         archive_group.add_argument(
         archive_group.add_argument(
@@ -904,6 +912,7 @@ class CreateMixIn:
             dest="checkpoint_volume",
             dest="checkpoint_volume",
             type=int,
             type=int,
             default=0,
             default=0,
+            action=Highlander,
             help="write checkpoint every BYTES bytes (Default: 0, meaning no volume based checkpointing)",
             help="write checkpoint every BYTES bytes (Default: 0, meaning no volume based checkpointing)",
         )
         )
         archive_group.add_argument(
         archive_group.add_argument(
@@ -923,6 +932,7 @@ class CreateMixIn:
             dest="compression",
             dest="compression",
             type=CompressionSpec,
             type=CompressionSpec,
             default=CompressionSpec("lz4"),
             default=CompressionSpec("lz4"),
+            action=Highlander,
             help="select compression algorithm, see the output of the " '"borg help compression" command for details.',
             help="select compression algorithm, see the output of the " '"borg help compression" command for details.',
         )
         )