From a8e13dd64cc7ab94255b178607d3b7497456f1bc Mon Sep 17 00:00:00 2001 From: Andrey Bienkowski Date: Sun, 20 Feb 2022 17:19:04 +0300 Subject: [PATCH 1/3] Backport: 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 8bcb6a7d9..42afde8fe 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -3444,16 +3444,15 @@ class Archiver: 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 @@ -3631,7 +3630,7 @@ class Archiver: 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, @@ -3708,7 +3707,7 @@ class Archiver: 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. @@ -3748,7 +3747,7 @@ class Archiver: 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__, @@ -3830,7 +3829,7 @@ class Archiver: 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 dffac711bbc094a89d72b45078635064b8e37f1c Mon Sep 17 00:00:00 2001 From: Andrey Bienkowski Date: Sun, 20 Feb 2022 17:30:57 +0300 Subject: [PATCH 2/3] Backport: docs: link to borg_patterns --- src/borg/archiver.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 42afde8fe..5c1750d65 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -2753,6 +2753,7 @@ class Archiver: rst_plain_text_references = { 'a_status_oddity': '"I am seeing ‘A’ (added) status for a unchanged file!?"', 'list_item_flags': '"Item flags"', + 'borg_patterns': '"borg help patterns"', 'key_files': 'Internals -> Data structures and file formats -> Key files', 'borg_key_export': 'borg key export --help', } @@ -3444,7 +3445,7 @@ class Archiver: 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. @@ -3630,7 +3631,7 @@ class Archiver: 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, @@ -3707,7 +3708,7 @@ class Archiver: 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. @@ -3747,7 +3748,7 @@ class Archiver: 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__, @@ -3829,7 +3830,7 @@ class Archiver: 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 d9b27561a28fc38dd49dad8e1393e60be1ef3b3d Mon Sep 17 00:00:00 2001 From: Andrey Bienkowski Date: Sun, 20 Feb 2022 17:33:53 +0300 Subject: [PATCH 3/3] Backport: 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 5c1750d65..e5f8f5152 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -2754,6 +2754,7 @@ class Archiver: 'a_status_oddity': '"I am seeing ‘A’ (added) status for a unchanged file!?"', 'list_item_flags': '"Item flags"', 'borg_patterns': '"borg help patterns"', + 'borg_placeholders': '"borg help placeholders"', 'key_files': 'Internals -> Data structures and file formats -> Key files', 'borg_key_export': 'borg key export --help', } @@ -3447,7 +3448,7 @@ class Archiver: 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