borgbackup/src/borg
Thomas Waldmann 8cbe4b8d48
improved tty-less progress reporting
Previously when running borg in a systemd service (and similar when piping to
a file and co.), these problems occurred:

- The carriage return both made it so that journald interpreted the output as
  binary, therefore not printing the text, while also not buffering
  correctly, so that log output was only available every once in a while
  in the form [40k blob data]. This can partially be worked around by
  using `journalctl -a` to view the logs, which at least prints the text,
  though only sporadically.

- The path was getting truncated to a short length, since the default
  get_terminal_size returns a column width of 80, which isn't relevant
  when printing to e.g. journald.

This commit fixes this by introducing a new code path for when stream is
not a tty, which always prints the full paths and ends lines with a linefeed.

This is based on unfinished PR #8939 by @infinisil, thanks for your suggestion!

Forward port of PR #9055 to master.
2025-10-16 01:59:43 +02:00
..
archiver Merge pull request #9051 from ThomasWaldmann/borg-mount-debugging 2025-10-10 20:19:29 +02:00
chunkers fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
crypto fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
helpers allow msgpack 1.1.2 2025-10-09 13:16:54 +02:00
platform manual corrections/reverts 2025-09-23 14:56:35 +02:00
testsuite improved tty-less progress reporting 2025-10-16 01:59:43 +02:00
__init__.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
__main__.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
_item.c item: item.to_optr(), Item.from_optr() 2017-07-29 17:26:39 +02:00
archive.py improved tty-less progress reporting 2025-10-16 01:59:43 +02:00
cache.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
checksums.pyi add mypy checking 2022-07-15 12:49:38 +02:00
checksums.pyx fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
compress.pyi *.pyi: fix types, add missing attrs 2023-01-30 15:54:48 +01:00
compress.pyx fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
conftest.py refactor platform tests into a package 2025-06-11 23:41:52 +02:00
constants.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
fslocking.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
fuse.py spelling: hard link(s) 2025-09-23 15:17:35 +02:00
fuse_impl.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
hashindex.pyi repo-compress: reduce memory consumption 2024-11-15 10:42:07 +01:00
hashindex.pyx fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
item.pyi fixes for tags infrastructure PR 2024-09-26 22:41:21 +02:00
item.pyx fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
legacyremote.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
legacyrepository.py spelling: hard link(s) 2025-09-23 15:17:35 +02:00
logger.py manual corrections/reverts 2025-09-23 14:56:35 +02:00
manifest.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
paperkey.html paperkey.html: fix typos, grammar, html structure 2025-09-23 14:53:54 +02:00
patterns.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
platformflags.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
remote.py suppress some bandit warnings 2025-06-01 18:00:37 +02:00
repoobj.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
repository.py manual corrections/reverts 2025-09-23 14:56:35 +02:00
selftest.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
storelocking.py manual corrections/reverts 2025-09-23 14:56:35 +02:00
upgrade.py spelling: hard link(s) 2025-09-23 15:17:35 +02:00
version.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00
xattr.py fixed typos and grammar (AI) 2025-09-23 14:56:23 +02:00