process_item was used only for dirs and fifo, replaced it by process_dir and process_fifo,
so the status can be generated there (as it is done for the other item types).
before this changesets, most informations about exceptions/tracebacks
on the remote side were lost. now they are transmitted and displayed,
together with the remote attic version.
don't catch "Exception" when OSError was meant (otherwise e.errno is not there anyway)
don't use bare "except:" if one can avoid (copied code fragment from similar handler)
added "nonlocal euid" - without this, euid just gets redefined in inner scope instead of assigned to outer scope
added check for euid 0 - if we run as root, we always have permissions (not just if we are file owner)
note: due to caching and OS behaviour on linux, the bug was a bit tricky to reproduce
and also the fix was a bit tricky to test.
one needs strictatime mount option to enfore traditional atime updating.
for repeated tests, always change file contents (e.g. from /dev/urandom) or attic's caching
will prevent that the file gets read ("accessed") again.
check atimes with ls -lu
i could reproduce code was broken and is fixed with this changeset. and root now doesn't touch any atimes.
Listing repositories with lots of archives on low-memory systems would cause attic to run out of memory due to items_buffer and chunker being created for each visited archive.
See https://github.com/jborg/attic/issues/163
we only need a little metadata and 1 medium sized piece of data, so
avoid memory allocation issues that could be caused by tampered input data.
bin type is more appropriate for binary data than str type (which could be also encoded text).
for level 0, zlib.compress is still at some cost, it doesn't just give back the data 1:1.
in fact, it even does add some overhead, creating larger output than input.
thus, it is replaced by NullCompressor, which really does nothing.
this way, serve() is more consistent with the other code, which always uses os.read/write (not sys.std*.buffer.read/write).
also: reduce code duplication a bit.