mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 01:37:20 +00:00
add --numeric-ids, deprecate --numeric-owner option, fixes #5724
This commit is contained in:
parent
c88a37eea4
commit
251ce11fd8
1 changed files with 10 additions and 1 deletions
|
@ -2546,7 +2546,8 @@ def preprocess_args(self, args):
|
||||||
deprecations = [
|
deprecations = [
|
||||||
# ('--old', '--new' or None, 'Warning: "--old" has been deprecated. Use "--new" instead.'),
|
# ('--old', '--new' or None, 'Warning: "--old" has been deprecated. Use "--new" instead.'),
|
||||||
('--noatime', None, 'Warning: "--noatime" has been deprecated because it is the default now.'),
|
('--noatime', None, 'Warning: "--noatime" has been deprecated because it is the default now.'),
|
||||||
('--nobsdflags', None, 'Warning: "--nobsdflags" has been deprecated. Use --noflags instead.')
|
('--nobsdflags', None, 'Warning: "--nobsdflags" has been deprecated. Use --noflags instead.'),
|
||||||
|
('--numeric-owner', None, 'Warning: "--numeric-owner" has been deprecated. Use --numeric-ids instead.'),
|
||||||
]
|
]
|
||||||
for i, arg in enumerate(args[:]):
|
for i, arg in enumerate(args[:]):
|
||||||
for old_name, new_name, warning in deprecations:
|
for old_name, new_name, warning in deprecations:
|
||||||
|
@ -2828,6 +2829,8 @@ def define_borg_mount(parser):
|
||||||
parser.add_argument('-o', dest='options', type=str,
|
parser.add_argument('-o', dest='options', type=str,
|
||||||
help='Extra mount options')
|
help='Extra mount options')
|
||||||
parser.add_argument('--numeric-owner', dest='numeric_owner', action='store_true',
|
parser.add_argument('--numeric-owner', dest='numeric_owner', action='store_true',
|
||||||
|
help='deprecated, use ``--numeric-ids`` instead')
|
||||||
|
parser.add_argument('--numeric-ids', dest='numeric_owner', action='store_true',
|
||||||
help='use numeric user and group identifiers from archive(s)')
|
help='use numeric user and group identifiers from archive(s)')
|
||||||
define_archive_filters_group(parser)
|
define_archive_filters_group(parser)
|
||||||
parser.add_argument('paths', metavar='PATH', nargs='*', type=str,
|
parser.add_argument('paths', metavar='PATH', nargs='*', type=str,
|
||||||
|
@ -3379,6 +3382,8 @@ def define_borg_mount(parser):
|
||||||
fs_group.add_argument('-x', '--one-file-system', dest='one_file_system', action='store_true',
|
fs_group.add_argument('-x', '--one-file-system', dest='one_file_system', action='store_true',
|
||||||
help='stay in the same file system and do not store mount points of other file systems. This might behave different from your expectations, see the docs.')
|
help='stay in the same file system and do not store mount points of other file systems. This might behave different from your expectations, see the docs.')
|
||||||
fs_group.add_argument('--numeric-owner', dest='numeric_owner', action='store_true',
|
fs_group.add_argument('--numeric-owner', dest='numeric_owner', action='store_true',
|
||||||
|
help='deprecated, use ``--numeric-ids`` instead')
|
||||||
|
fs_group.add_argument('--numeric-ids', dest='numeric_owner', action='store_true',
|
||||||
help='only store numeric user and group identifiers')
|
help='only store numeric user and group identifiers')
|
||||||
# --noatime is the default now and the flag is deprecated. args.noatime is not used any more.
|
# --noatime is the default now and the flag is deprecated. args.noatime is not used any more.
|
||||||
# use --atime if you want to store the atime (default behaviour before borg 1.2.0a7)..
|
# use --atime if you want to store the atime (default behaviour before borg 1.2.0a7)..
|
||||||
|
@ -3709,6 +3714,8 @@ def define_borg_mount(parser):
|
||||||
help='find differences in archive contents')
|
help='find differences in archive contents')
|
||||||
subparser.set_defaults(func=self.do_diff)
|
subparser.set_defaults(func=self.do_diff)
|
||||||
subparser.add_argument('--numeric-owner', dest='numeric_owner', action='store_true',
|
subparser.add_argument('--numeric-owner', dest='numeric_owner', action='store_true',
|
||||||
|
help='deprecated, use ``--numeric-ids`` instead')
|
||||||
|
subparser.add_argument('--numeric-ids', dest='numeric_owner', action='store_true',
|
||||||
help='only consider numeric user and group identifiers')
|
help='only consider numeric user and group identifiers')
|
||||||
subparser.add_argument('--same-chunker-params', dest='same_chunker_params', action='store_true',
|
subparser.add_argument('--same-chunker-params', dest='same_chunker_params', action='store_true',
|
||||||
help='Override check of chunker parameters.')
|
help='Override check of chunker parameters.')
|
||||||
|
@ -3813,6 +3820,8 @@ def define_borg_mount(parser):
|
||||||
subparser.add_argument('-n', '--dry-run', dest='dry_run', action='store_true',
|
subparser.add_argument('-n', '--dry-run', dest='dry_run', action='store_true',
|
||||||
help='do not actually change any files')
|
help='do not actually change any files')
|
||||||
subparser.add_argument('--numeric-owner', dest='numeric_owner', action='store_true',
|
subparser.add_argument('--numeric-owner', dest='numeric_owner', action='store_true',
|
||||||
|
help='deprecated, use ``--numeric-ids`` instead')
|
||||||
|
subparser.add_argument('--numeric-ids', dest='numeric_owner', action='store_true',
|
||||||
help='only obey numeric user and group identifiers')
|
help='only obey numeric user and group identifiers')
|
||||||
subparser.add_argument('--nobsdflags', dest='nobsdflags', action='store_true',
|
subparser.add_argument('--nobsdflags', dest='nobsdflags', action='store_true',
|
||||||
help='deprecated, use ``--noflags`` instead')
|
help='deprecated, use ``--noflags`` instead')
|
||||||
|
|
Loading…
Reference in a new issue