mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-23 08:16:54 +00:00
cache sync: change progress output to separate lines
printing without \n plus sys.stdout.flush() didn't work as expected.
This commit is contained in:
parent
197ca9c0d3
commit
69456e07c4
1 changed files with 3 additions and 4 deletions
|
@ -307,14 +307,13 @@ def create_master_idx(chunk_idx, tf_in, tmp_dir):
|
||||||
for tarinfo in tf_in:
|
for tarinfo in tf_in:
|
||||||
archive_id_hex = tarinfo.name
|
archive_id_hex = tarinfo.name
|
||||||
archive_name = tarinfo.pax_headers['archive_name']
|
archive_name = tarinfo.pax_headers['archive_name']
|
||||||
print("- processing archive: %s -> extract, " % archive_name, end='') ; sys.stdout.flush()
|
print("- extracting archive %s ..." % archive_name)
|
||||||
tf_in.extract(archive_id_hex, tmp_dir)
|
tf_in.extract(archive_id_hex, tmp_dir)
|
||||||
chunk_idx_path = os.path.join(tmp_dir, archive_id_hex).encode('utf-8')
|
chunk_idx_path = os.path.join(tmp_dir, archive_id_hex).encode('utf-8')
|
||||||
print("read, ", end='') ; sys.stdout.flush()
|
print("- reading archive ...")
|
||||||
archive_chunk_idx = ChunkIndex.read(chunk_idx_path)
|
archive_chunk_idx = ChunkIndex.read(chunk_idx_path)
|
||||||
print("merge, ", end='') ; sys.stdout.flush()
|
print("- merging archive ...")
|
||||||
chunk_idx.merge(archive_chunk_idx)
|
chunk_idx.merge(archive_chunk_idx)
|
||||||
print("done.")
|
|
||||||
os.unlink(chunk_idx_path)
|
os.unlink(chunk_idx_path)
|
||||||
|
|
||||||
self.begin_txn()
|
self.begin_txn()
|
||||||
|
|
Loading…
Reference in a new issue