diff --git a/src/borg/archiver/rlist_cmd.py b/src/borg/archiver/rlist_cmd.py index 0001f5ddb..895d426a1 100644 --- a/src/borg/archiver/rlist_cmd.py +++ b/src/borg/archiver/rlist_cmd.py @@ -114,7 +114,6 @@ class RListMixIn: help="Format output as JSON. " "The form of ``--format`` is ignored, " "but keys used in it are added to the JSON output. " - "Some keys are always present. Note: JSON can only represent text. " - 'A "barchive" key is therefore not available.', + "Some keys are always present. Note: JSON can only represent text.", ) define_archive_filters_group(subparser) diff --git a/src/borg/helpers/parseformat.py b/src/borg/helpers/parseformat.py index 458cbff56..5656bb0e2 100644 --- a/src/borg/helpers/parseformat.py +++ b/src/borg/helpers/parseformat.py @@ -616,7 +616,7 @@ class BaseFormatter: return ( "- NEWLINE: OS dependent line separator\n" "- NL: alias of NEWLINE\n" - "- NUL: NUL character for creating print0 / xargs -0 like output, see barchive and bpath keys below\n" + "- NUL: NUL character for creating print0 / xargs -0 like output, see bpath key below\n" "- SPACE\n" "- TAB\n" "- CR\n" @@ -626,9 +626,8 @@ class BaseFormatter: class ArchiveFormatter(BaseFormatter): KEY_DESCRIPTIONS = { - "archive": "archive name interpreted as text (might be missing non-text characters, see barchive)", + "archive": "archive name", "name": 'alias of "archive"', - "barchive": "verbatim archive name, can contain any character except NUL", "comment": "archive comment", # *start* is the key used by borg-info for this timestamp, this makes the formats more compatible "start": "time (start) of creation of the archive", @@ -640,7 +639,7 @@ class ArchiveFormatter(BaseFormatter): "username": "username of user who created this archive", } KEY_GROUPS = ( - ("archive", "name", "barchive", "comment", "id"), + ("archive", "name", "comment", "id"), ("start", "time", "end", "command_line"), ("hostname", "username"), ) @@ -713,7 +712,6 @@ class ArchiveFormatter(BaseFormatter): { "name": remove_surrogates(archive_info.name), "archive": remove_surrogates(archive_info.name), - "barchive": archive_info.name, "id": bin_to_hex(archive_info.id), "time": self.format_time(archive_info.ts), "start": self.format_time(archive_info.ts), diff --git a/src/borg/testsuite/archiver/rlist_cmd.py b/src/borg/testsuite/archiver/rlist_cmd.py index 3c01733e8..f4ceff626 100644 --- a/src/borg/testsuite/archiver/rlist_cmd.py +++ b/src/borg/testsuite/archiver/rlist_cmd.py @@ -35,8 +35,6 @@ class ArchiverTestCase(ArchiverTestCaseBase): self.assertEqual(output_1, output_2) output_1 = self.cmd(f"--repo={self.repository_location}", "rlist", "--short") self.assertEqual(output_1, "test-1\ntest-2\n") - output_1 = self.cmd(f"--repo={self.repository_location}", "rlist", "--format", "{barchive}/") - self.assertEqual(output_1, "test-1/test-2/") output_3 = self.cmd(f"--repo={self.repository_location}", "rlist", "--format", "{name} {comment}{NL}") self.assert_in("test-1 comment 1\n", output_3) self.assert_in("test-2 comment 2\n", output_3) diff --git a/src/borg/testsuite/archiver/transfer_cmd.py b/src/borg/testsuite/archiver/transfer_cmd.py index 202167f1d..acc978101 100644 --- a/src/borg/testsuite/archiver/transfer_cmd.py +++ b/src/borg/testsuite/archiver/transfer_cmd.py @@ -81,6 +81,7 @@ class ArchiverTestCase(ArchiverTestCaseBase): for got_archive, expected_archive in zip(got["archives"], expected["archives"]): del got_archive["id"] del expected_archive["id"] + del expected_archive["barchive"] # timestamps: # borg 1.2 transformed to local time and had microseconds = 0, no tzoffset # borg 2 uses an utc timestamp, with microseconds and with tzoffset