From 288cac788c677013068ea2025605214941b626c1 Mon Sep 17 00:00:00 2001 From: Marian Beermann Date: Fri, 2 Dec 2016 13:28:49 +0100 Subject: [PATCH] setup.py: build_usage: don't generate includes for debug commands --- docs/usage/debug-delete-obj.rst.inc | 39 --------------------- docs/usage/debug-dump-archive-items.rst.inc | 38 -------------------- docs/usage/debug-dump-repo-objs.rst.inc | 38 -------------------- docs/usage/debug-get-obj.rst.inc | 39 --------------------- docs/usage/debug-info.rst.inc | 35 ------------------ docs/usage/debug-put-obj.rst.inc | 38 -------------------- setup.py | 5 ++- 7 files changed, 4 insertions(+), 228 deletions(-) delete mode 100644 docs/usage/debug-delete-obj.rst.inc delete mode 100644 docs/usage/debug-dump-archive-items.rst.inc delete mode 100644 docs/usage/debug-dump-repo-objs.rst.inc delete mode 100644 docs/usage/debug-get-obj.rst.inc delete mode 100644 docs/usage/debug-info.rst.inc delete mode 100644 docs/usage/debug-put-obj.rst.inc diff --git a/docs/usage/debug-delete-obj.rst.inc b/docs/usage/debug-delete-obj.rst.inc deleted file mode 100644 index 7ed144bfb..000000000 --- a/docs/usage/debug-delete-obj.rst.inc +++ /dev/null @@ -1,39 +0,0 @@ -.. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit! - -.. _borg_debug-delete-obj: - -borg debug-delete-obj ---------------------- -:: - - usage: borg debug-delete-obj [-h] [--critical] [--error] [--warning] [--info] - [--debug] [--lock-wait N] [--show-rc] - [--no-files-cache] [--umask M] - [--remote-path PATH] - [REPOSITORY] IDs [IDs ...] - - delete the objects with the given IDs from the repo - - positional arguments: - REPOSITORY repository to use - IDs hex object ID(s) to delete from the repo - - optional arguments: - -h, --help show this help message and exit - --critical work on log level CRITICAL - --error work on log level ERROR - --warning work on log level WARNING (default) - --info, -v, --verbose - work on log level INFO - --debug work on log level DEBUG - --lock-wait N wait for the lock, but max. N seconds (default: 1). - --show-rc show/log the return code (rc) - --no-files-cache do not load/update the file metadata cache used to - detect unchanged files - --umask M set umask to M (local and remote, default: 0077) - --remote-path PATH set remote path to executable (default: "borg") - -Description -~~~~~~~~~~~ - -This command deletes objects from the repository. diff --git a/docs/usage/debug-dump-archive-items.rst.inc b/docs/usage/debug-dump-archive-items.rst.inc deleted file mode 100644 index e83bbf854..000000000 --- a/docs/usage/debug-dump-archive-items.rst.inc +++ /dev/null @@ -1,38 +0,0 @@ -.. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit! - -.. _borg_debug-dump-archive-items: - -borg debug-dump-archive-items ------------------------------ -:: - - usage: borg debug-dump-archive-items [-h] [--critical] [--error] [--warning] - [--info] [--debug] [--lock-wait N] - [--show-rc] [--no-files-cache] - [--umask M] [--remote-path PATH] - ARCHIVE - - dump (decrypted, decompressed) archive items metadata (not: data) - - positional arguments: - ARCHIVE archive to dump - - optional arguments: - -h, --help show this help message and exit - --critical work on log level CRITICAL - --error work on log level ERROR - --warning work on log level WARNING (default) - --info, -v, --verbose - work on log level INFO - --debug work on log level DEBUG - --lock-wait N wait for the lock, but max. N seconds (default: 1). - --show-rc show/log the return code (rc) - --no-files-cache do not load/update the file metadata cache used to - detect unchanged files - --umask M set umask to M (local and remote, default: 0077) - --remote-path PATH set remote path to executable (default: "borg") - -Description -~~~~~~~~~~~ - -This command dumps raw (but decrypted and decompressed) archive items (only metadata) to files. diff --git a/docs/usage/debug-dump-repo-objs.rst.inc b/docs/usage/debug-dump-repo-objs.rst.inc deleted file mode 100644 index 4fcd45ae8..000000000 --- a/docs/usage/debug-dump-repo-objs.rst.inc +++ /dev/null @@ -1,38 +0,0 @@ -.. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit! - -.. _borg_debug-dump-repo-objs: - -borg debug-dump-repo-objs -------------------------- -:: - - usage: borg debug-dump-repo-objs [-h] [--critical] [--error] [--warning] - [--info] [--debug] [--lock-wait N] - [--show-rc] [--no-files-cache] [--umask M] - [--remote-path PATH] - REPOSITORY - - dump (decrypted, decompressed) repo objects - - positional arguments: - REPOSITORY repo to dump - - optional arguments: - -h, --help show this help message and exit - --critical work on log level CRITICAL - --error work on log level ERROR - --warning work on log level WARNING (default) - --info, -v, --verbose - work on log level INFO - --debug work on log level DEBUG - --lock-wait N wait for the lock, but max. N seconds (default: 1). - --show-rc show/log the return code (rc) - --no-files-cache do not load/update the file metadata cache used to - detect unchanged files - --umask M set umask to M (local and remote, default: 0077) - --remote-path PATH set remote path to executable (default: "borg") - -Description -~~~~~~~~~~~ - -This command dumps raw (but decrypted and decompressed) repo objects to files. diff --git a/docs/usage/debug-get-obj.rst.inc b/docs/usage/debug-get-obj.rst.inc deleted file mode 100644 index f38f0e884..000000000 --- a/docs/usage/debug-get-obj.rst.inc +++ /dev/null @@ -1,39 +0,0 @@ -.. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit! - -.. _borg_debug-get-obj: - -borg debug-get-obj ------------------- -:: - - usage: borg debug-get-obj [-h] [--critical] [--error] [--warning] [--info] - [--debug] [--lock-wait N] [--show-rc] - [--no-files-cache] [--umask M] [--remote-path PATH] - [REPOSITORY] ID PATH - - get object contents from the repository and write it into file - - positional arguments: - REPOSITORY repository to use - ID hex object ID to get from the repo - PATH file to write object data into - - optional arguments: - -h, --help show this help message and exit - --critical work on log level CRITICAL - --error work on log level ERROR - --warning work on log level WARNING (default) - --info, -v, --verbose - work on log level INFO - --debug work on log level DEBUG - --lock-wait N wait for the lock, but max. N seconds (default: 1). - --show-rc show/log the return code (rc) - --no-files-cache do not load/update the file metadata cache used to - detect unchanged files - --umask M set umask to M (local and remote, default: 0077) - --remote-path PATH set remote path to executable (default: "borg") - -Description -~~~~~~~~~~~ - -This command gets an object from the repository. diff --git a/docs/usage/debug-info.rst.inc b/docs/usage/debug-info.rst.inc deleted file mode 100644 index 2f4f7237f..000000000 --- a/docs/usage/debug-info.rst.inc +++ /dev/null @@ -1,35 +0,0 @@ -.. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit! - -.. _borg_debug-info: - -borg debug-info ---------------- -:: - - usage: borg debug-info [-h] [--critical] [--error] [--warning] [--info] - [--debug] [--lock-wait N] [--show-rc] - [--no-files-cache] [--umask M] [--remote-path PATH] - - display system information for debugging / bug reports - - optional arguments: - -h, --help show this help message and exit - --critical work on log level CRITICAL - --error work on log level ERROR - --warning work on log level WARNING (default) - --info, -v, --verbose - work on log level INFO - --debug work on log level DEBUG - --lock-wait N wait for the lock, but max. N seconds (default: 1). - --show-rc show/log the return code (rc) - --no-files-cache do not load/update the file metadata cache used to - detect unchanged files - --umask M set umask to M (local and remote, default: 0077) - --remote-path PATH set remote path to executable (default: "borg") - -Description -~~~~~~~~~~~ - -This command displays some system information that might be useful for bug -reports and debugging problems. If a traceback happens, this information is -already appended at the end of the traceback. diff --git a/docs/usage/debug-put-obj.rst.inc b/docs/usage/debug-put-obj.rst.inc deleted file mode 100644 index 4f02324bf..000000000 --- a/docs/usage/debug-put-obj.rst.inc +++ /dev/null @@ -1,38 +0,0 @@ -.. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit! - -.. _borg_debug-put-obj: - -borg debug-put-obj ------------------- -:: - - usage: borg debug-put-obj [-h] [--critical] [--error] [--warning] [--info] - [--debug] [--lock-wait N] [--show-rc] - [--no-files-cache] [--umask M] [--remote-path PATH] - [REPOSITORY] PATH [PATH ...] - - put file(s) contents into the repository - - positional arguments: - REPOSITORY repository to use - PATH file(s) to read and create object(s) from - - optional arguments: - -h, --help show this help message and exit - --critical work on log level CRITICAL - --error work on log level ERROR - --warning work on log level WARNING (default) - --info, -v, --verbose - work on log level INFO - --debug work on log level DEBUG - --lock-wait N wait for the lock, but max. N seconds (default: 1). - --show-rc show/log the return code (rc) - --no-files-cache do not load/update the file metadata cache used to - detect unchanged files - --umask M set umask to M (local and remote, default: 0077) - --remote-path PATH set remote path to executable (default: "borg") - -Description -~~~~~~~~~~~ - -This command puts objects into the repository. diff --git a/setup.py b/setup.py index e321d41fe..00e48f3f3 100644 --- a/setup.py +++ b/setup.py @@ -181,7 +181,10 @@ class build_usage(Command): return print('found commands: %s' % list(choices.keys())) - for command, parser in choices.items(): + for command, parser in sorted(choices.items()): + if command.startswith('debug'): + print('skipping', command) + continue print('generating help for %s' % command) if self.generate_level(command + " ", parser, Archiver):