浏览代码

Merge pull request #1922 from enkore/f/buildusage

setup.py: fix build_usage not processing all commands
TW 8 年之前
父节点
当前提交
7eb2dff116

+ 0 - 39
docs/usage/debug-delete-obj.rst.inc

@@ -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.

+ 0 - 38
docs/usage/debug-dump-archive-items.rst.inc

@@ -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.

+ 0 - 38
docs/usage/debug-dump-repo-objs.rst.inc

@@ -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.

+ 0 - 39
docs/usage/debug-get-obj.rst.inc

@@ -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.

+ 0 - 35
docs/usage/debug-info.rst.inc

@@ -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.

+ 0 - 38
docs/usage/debug-put-obj.rst.inc

@@ -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.

+ 5 - 2
setup.py

@@ -181,11 +181,14 @@ 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):
-                break
+                continue
 
             with open('docs/usage/%s.rst.inc' % command.replace(" ", "_"), 'w') as doc:
                 doc.write(".. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!\n\n")