]> arthur.barton.de Git - bup.git/commit
metadata: always add/store/retrieve size for links and normal files
authorRob Browning <rlb@defaultvalue.org>
Sat, 20 Oct 2018 23:04:27 +0000 (18:04 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 13 Jan 2019 18:09:13 +0000 (12:09 -0600)
commitb8bb5f94f2fcd98e09eaeec8451495e3ec363ff8
treed296c328d121623ddbadb4a9283657bbeadf5b91
parent5fc56d8e45065211119c781de0546e83c8270479
metadata: always add/store/retrieve size for links and normal files

This simplifies cases where we need to transmit Metadata
objects (i.e. bup-get's repo.resolve()), and it means that for trees
created using this new v3 format, retrieving the sizes of chunked
files should be notably less expensive, since they'll be directly
available in the directory's .bupm file.

Without that, we have to seek around in the chunked tree to find the
last byte (cf. vfs._normal_or_chunked_file_size).

Only store the sizes for symlinks and regular files (which might be
chunked) until it's clear that other st_sizes are useful.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
cmd/save-cmd.py
lib/bup/metadata.py
lib/bup/t/tvfs.py