mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-27 02:08:54 +00:00
fix repository arg default
This commit is contained in:
parent
b3f5231bac
commit
817ce18bc6
1 changed files with 7 additions and 7 deletions
|
@ -18,7 +18,7 @@
|
||||||
from .repository import Repository
|
from .repository import Repository
|
||||||
from .cache import Cache
|
from .cache import Cache
|
||||||
from .key import key_creator
|
from .key import key_creator
|
||||||
from .helpers import Error, location_validator, Location, format_time, format_file_size, \
|
from .helpers import Error, location_validator, format_time, format_file_size, \
|
||||||
format_file_mode, ExcludePattern, exclude_path, adjust_patterns, to_localtime, timestamp, \
|
format_file_mode, ExcludePattern, exclude_path, adjust_patterns, to_localtime, timestamp, \
|
||||||
get_cache_dir, get_keys_dir, format_timedelta, prune_within, prune_split, \
|
get_cache_dir, get_keys_dir, format_timedelta, prune_within, prune_split, \
|
||||||
Manifest, remove_surrogates, update_excludes, format_archive, check_extension_modules, Statistics, \
|
Manifest, remove_surrogates, update_excludes, format_archive, check_extension_modules, Statistics, \
|
||||||
|
@ -556,7 +556,7 @@ def run(self, args=None):
|
||||||
description=self.do_init.__doc__, epilog=init_epilog,
|
description=self.do_init.__doc__, epilog=init_epilog,
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter)
|
formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||||
subparser.set_defaults(func=self.do_init)
|
subparser.set_defaults(func=self.do_init)
|
||||||
subparser.add_argument('repository', metavar='REPOSITORY', nargs='?', default=Location(),
|
subparser.add_argument('repository', metavar='REPOSITORY', nargs='?', default='',
|
||||||
type=location_validator(archive=False),
|
type=location_validator(archive=False),
|
||||||
help='repository to create')
|
help='repository to create')
|
||||||
subparser.add_argument('-e', '--encryption', dest='encryption',
|
subparser.add_argument('-e', '--encryption', dest='encryption',
|
||||||
|
@ -604,7 +604,7 @@ def run(self, args=None):
|
||||||
epilog=check_epilog,
|
epilog=check_epilog,
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter)
|
formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||||
subparser.set_defaults(func=self.do_check)
|
subparser.set_defaults(func=self.do_check)
|
||||||
subparser.add_argument('repository', metavar='REPOSITORY_OR_ARCHIVE', nargs='?', default=Location(),
|
subparser.add_argument('repository', metavar='REPOSITORY_OR_ARCHIVE', nargs='?', default='',
|
||||||
type=location_validator(),
|
type=location_validator(),
|
||||||
help='repository or archive to check consistency of')
|
help='repository or archive to check consistency of')
|
||||||
subparser.add_argument('--repository-only', dest='repo_only', action='store_true',
|
subparser.add_argument('--repository-only', dest='repo_only', action='store_true',
|
||||||
|
@ -629,7 +629,7 @@ def run(self, args=None):
|
||||||
epilog=change_passphrase_epilog,
|
epilog=change_passphrase_epilog,
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter)
|
formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||||
subparser.set_defaults(func=self.do_change_passphrase)
|
subparser.set_defaults(func=self.do_change_passphrase)
|
||||||
subparser.add_argument('repository', metavar='REPOSITORY', nargs='?', default=Location(),
|
subparser.add_argument('repository', metavar='REPOSITORY', nargs='?', default='',
|
||||||
type=location_validator(archive=False))
|
type=location_validator(archive=False))
|
||||||
|
|
||||||
create_epilog = textwrap.dedent("""
|
create_epilog = textwrap.dedent("""
|
||||||
|
@ -760,7 +760,7 @@ def run(self, args=None):
|
||||||
subparser.add_argument('-s', '--stats', dest='stats',
|
subparser.add_argument('-s', '--stats', dest='stats',
|
||||||
action='store_true', default=False,
|
action='store_true', default=False,
|
||||||
help='print statistics for the deleted archive')
|
help='print statistics for the deleted archive')
|
||||||
subparser.add_argument('target', metavar='TARGET', nargs='?', default=Location(),
|
subparser.add_argument('target', metavar='TARGET', nargs='?', default='',
|
||||||
type=location_validator(),
|
type=location_validator(),
|
||||||
help='archive or repository to delete')
|
help='archive or repository to delete')
|
||||||
|
|
||||||
|
@ -775,7 +775,7 @@ def run(self, args=None):
|
||||||
subparser.add_argument('--short', dest='short',
|
subparser.add_argument('--short', dest='short',
|
||||||
action='store_true', default=False,
|
action='store_true', default=False,
|
||||||
help='only print file/directory names, nothing else')
|
help='only print file/directory names, nothing else')
|
||||||
subparser.add_argument('src', metavar='REPOSITORY_OR_ARCHIVE', nargs='?', default=Location(),
|
subparser.add_argument('src', metavar='REPOSITORY_OR_ARCHIVE', nargs='?', default='',
|
||||||
type=location_validator(),
|
type=location_validator(),
|
||||||
help='repository/archive to list contents of')
|
help='repository/archive to list contents of')
|
||||||
mount_epilog = textwrap.dedent("""
|
mount_epilog = textwrap.dedent("""
|
||||||
|
@ -859,7 +859,7 @@ def run(self, args=None):
|
||||||
help='number of yearly archives to keep')
|
help='number of yearly archives to keep')
|
||||||
subparser.add_argument('-p', '--prefix', dest='prefix', type=str,
|
subparser.add_argument('-p', '--prefix', dest='prefix', type=str,
|
||||||
help='only consider archive names starting with this prefix')
|
help='only consider archive names starting with this prefix')
|
||||||
subparser.add_argument('repository', metavar='REPOSITORY', nargs='?', default=Location(),
|
subparser.add_argument('repository', metavar='REPOSITORY', nargs='?', default='',
|
||||||
type=location_validator(archive=False),
|
type=location_validator(archive=False),
|
||||||
help='repository to prune')
|
help='repository to prune')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue