[PATCH 2/7] Client(): only require list-indexes and send-index when needed

0 views
Skip to first unread message

Rob Browning

unread,
Mar 14, 2026, 6:31:20 PM (10 days ago) Mar 14
to bup-...@googlegroups.com
Previously we always required both.

Thanks to Johannes Berg for proposing the change.

Signed-off-by: Rob Browning <r...@defaultvalue.org>
Tested-by: Rob Browning <r...@defaultvalue.org>
---
lib/bup/client.py | 2 +-
note/main.md | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/bup/client.py b/lib/bup/client.py
index 7530d0c5..1b2b0d2b 100644
--- a/lib/bup/client.py
+++ b/lib/bup/client.py
@@ -348,7 +348,6 @@ class Client:
else: # use the decoded path
legacy_id = _legacy_cache_id_for_host_path(url.host, self.path)
self.cachedir = self._prep_cache(legacy_id)
- self.sync_indexes()
ctx.pop_all()
self.closed = False

@@ -497,6 +496,7 @@ class Client:
def new_packwriter(self, compression_level=None,
max_pack_size=None, max_pack_objects=None):
self._require_command(b'receive-objects-v2')
+ self.sync_indexes()
self.check_busy()
def set_busy():
self._busy = b'receive-objects-v2'
diff --git a/note/main.md b/note/main.md
index 383b794f..1e13ae7b 100644
--- a/note/main.md
+++ b/note/main.md
@@ -230,6 +230,10 @@ Bugs
`some/SAVE/.bupm` file) is missing. Previously it failed with
"EOFError('encountered EOF while reading vuint')".

+* Remote operations (i.e. those involving `--remote` or `bup on`) that
+ don't need the index-cache no longer populate it. Previously all of
+ them did.
+
Build system
------------

--
2.47.3

Reply all
Reply to author
Forward
0 new messages