From 42fb25d4a7ba16c781d2bcce54466c074d8b6f58 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 7 Feb 2022 21:40:15 +0100 Subject: [PATCH 1/4] docs: use same phrasing in misc. help texts --- src/borg/archiver.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 12f53a5688..510311eea2 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -3328,16 +3328,15 @@ def define_borg_mount(parser): the state after creation. Also, the ``--stats`` and ``--dry-run`` options are mutually exclusive because the data is not actually compressed and deduplicated during a dry run. - See the output of the "borg help patterns" command for more help on exclude patterns. + For more help on include/exclude patterns, see the ``borg help patterns`` command output. - See the output of the "borg help placeholders" command for more help on placeholders. + For more help on placeholders, see the ``borg help placeholders`` command output. .. man NOTES The ``--exclude`` patterns are not like tar. In tar ``--exclude`` .bundler/gems will exclude foo/.bundler/gems. In borg it will not, you need to use ``--exclude`` - '\\*/.bundler/gems' to get the same effect. See ``borg help patterns`` for - more information. + '\\*/.bundler/gems' to get the same effect. In addition to using ``--exclude`` patterns, it is possible to use ``--exclude-if-present`` to specify the name of a filesystem object (e.g. a file @@ -3808,7 +3807,7 @@ def define_borg_mount(parser): pass ``--same-chunker-params``. Note that the chunker params changed from Borg 0.xx to 1.0. - See the output of the "borg help patterns" command for more help on exclude patterns. + For more help on include/exclude patterns, see the ``borg help patterns`` command output. """) subparser = subparsers.add_parser('diff', parents=[common_parser], add_help=False, description=self.do_diff.__doc__, @@ -3869,7 +3868,7 @@ def define_borg_mount(parser): can be selected by passing a list of ``PATHs`` as arguments. The file selection can further be restricted by using the ``--exclude`` option. - See the output of the "borg help patterns" command for more help on exclude patterns. + For more help on include/exclude patterns, see the ``borg help patterns`` command output. ``--progress`` can be slower than no progress display, since it makes one additional pass over the archive metadata. @@ -3900,7 +3899,7 @@ def define_borg_mount(parser): by passing a list of ``PATHs`` as arguments. The file selection can further be restricted by using the ``--exclude`` option. - See the output of the "borg help patterns" command for more help on exclude patterns. + For more help on include/exclude patterns, see the ``borg help patterns`` command output. By using ``--dry-run``, you can do all extraction steps except actually writing the output data: reading metadata and data chunks from the repo, checking the hash/hmac, @@ -4266,7 +4265,7 @@ def define_borg_mount(parser): list_epilog = process_epilog(""" This command lists the contents of a repository or an archive. - See the "borg help patterns" command for more help on exclude patterns. + For more help on include/exclude patterns, see the ``borg help patterns`` command output. .. man NOTES From d79b325494820f61372a61043226c34d2c7d8bc7 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 7 Feb 2022 22:25:34 +0100 Subject: [PATCH 2/4] docs: link to borg_patterns --- src/borg/archiver.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 510311eea2..09fa057525 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -2762,6 +2762,7 @@ def build_parser(self): 'a_status_oddity': '"I am seeing ‘A’ (added) status for a unchanged file!?"', 'separate_compaction': '"Separate compaction"', 'list_item_flags': '"Item flags"', + 'borg_patterns': '"borg help patterns"', } def process_epilog(epilog): @@ -3328,7 +3329,7 @@ def define_borg_mount(parser): the state after creation. Also, the ``--stats`` and ``--dry-run`` options are mutually exclusive because the data is not actually compressed and deduplicated during a dry run. - For more help on include/exclude patterns, see the ``borg help patterns`` command output. + For more help on include/exclude patterns, see the :ref:`borg_patterns` command output. For more help on placeholders, see the ``borg help placeholders`` command output. @@ -3755,7 +3756,7 @@ def define_borg_mount(parser): You can delete multiple archives by specifying their common prefix, if they have one, using the ``--prefix PREFIX`` option. You can also specify a shell pattern to match multiple archives using the ``--glob-archives GLOB`` option - (for more info on these patterns, see ``borg help patterns``). Note that these + (for more info on these patterns, see :ref:`borg_patterns`). Note that these two options are mutually exclusive. To avoid accidentally deleting archives, especially when using glob patterns, @@ -3807,7 +3808,7 @@ def define_borg_mount(parser): pass ``--same-chunker-params``. Note that the chunker params changed from Borg 0.xx to 1.0. - For more help on include/exclude patterns, see the ``borg help patterns`` command output. + For more help on include/exclude patterns, see the :ref:`borg_patterns` command output. """) subparser = subparsers.add_parser('diff', parents=[common_parser], add_help=False, description=self.do_diff.__doc__, @@ -3868,7 +3869,7 @@ def define_borg_mount(parser): can be selected by passing a list of ``PATHs`` as arguments. The file selection can further be restricted by using the ``--exclude`` option. - For more help on include/exclude patterns, see the ``borg help patterns`` command output. + For more help on include/exclude patterns, see the :ref:`borg_patterns` command output. ``--progress`` can be slower than no progress display, since it makes one additional pass over the archive metadata. @@ -3899,7 +3900,7 @@ def define_borg_mount(parser): by passing a list of ``PATHs`` as arguments. The file selection can further be restricted by using the ``--exclude`` option. - For more help on include/exclude patterns, see the ``borg help patterns`` command output. + For more help on include/exclude patterns, see the :ref:`borg_patterns` command output. By using ``--dry-run``, you can do all extraction steps except actually writing the output data: reading metadata and data chunks from the repo, checking the hash/hmac, @@ -4265,7 +4266,7 @@ def define_borg_mount(parser): list_epilog = process_epilog(""" This command lists the contents of a repository or an archive. - For more help on include/exclude patterns, see the ``borg help patterns`` command output. + For more help on include/exclude patterns, see the :ref:`borg_patterns` command output. .. man NOTES From 510ceb86f819ae9eaa5fd362858f49d444985889 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 7 Feb 2022 22:36:24 +0100 Subject: [PATCH 3/4] docs: link to borg_placeholders --- src/borg/archiver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 09fa057525..c30be5239e 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -2763,6 +2763,7 @@ def build_parser(self): 'separate_compaction': '"Separate compaction"', 'list_item_flags': '"Item flags"', 'borg_patterns': '"borg help patterns"', + 'borg_placeholders': '"borg help placeholders"', } def process_epilog(epilog): @@ -3331,7 +3332,7 @@ def define_borg_mount(parser): For more help on include/exclude patterns, see the :ref:`borg_patterns` command output. - For more help on placeholders, see the ``borg help placeholders`` command output. + For more help on placeholders, see the :ref:`borg_placeholders` command output. .. man NOTES From 3428b9f2b4966e7d6bd14c803d829d6585d860f1 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 7 Feb 2022 23:23:15 +0100 Subject: [PATCH 4/4] docs: link to python 3.8 docs because py38 is our minimum requirement. --- src/borg/archiver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index c30be5239e..4280cc4b80 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -2452,11 +2452,11 @@ def do_break_lock(self, args, repository): {now} The current local date and time, by default in ISO-8601 format. - You can also supply your own `format string `_, e.g. {now:%Y-%m-%d_%H:%M:%S} + You can also supply your own `format string `_, e.g. {now:%Y-%m-%d_%H:%M:%S} {utcnow} The current UTC date and time, by default in ISO-8601 format. - You can also supply your own `format string `_, e.g. {utcnow:%Y-%m-%d_%H:%M:%S} + You can also supply your own `format string `_, e.g. {utcnow:%Y-%m-%d_%H:%M:%S} {user} The user name (or UID, if no name is available) of the user running borg.