]> arthur.barton.de Git - bup.git/commitdiff
move auto_midx calls to callers of sync_index
authorBrandon Low <lostlogic@lostlogicx.com>
Sat, 8 Jan 2011 19:56:01 +0000 (11:56 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Mon, 10 Jan 2011 02:00:25 +0000 (18:00 -0800)
In call cases, sync_index is now called from a loop.  It makes more
sense to have the callers run auto_midx after the loop now.

Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
lib/bup/client.py

index 73ce7d112bb11646be8e348626f21c435b288638..0bb5219c4f9bc6952a0031cefb5da69cfdae3aec 100644 (file)
@@ -170,6 +170,8 @@ class Client:
         debug1('client: server requested load of: %s\n' % needed)
         for idx in needed:
             self.sync_index(idx)
+        git.auto_midx(self.cachedir)
+
 
     def sync_index(self, name):
         #debug1('requesting %r\n' % name)
@@ -190,7 +192,6 @@ class Client:
         self.check_ok()
         f.close()
         os.rename(fn + '.tmp', fn)
-        git.auto_midx(self.cachedir)
 
     def _make_objcache(self):
         return git.PackIdxList(self.cachedir)
@@ -218,6 +219,7 @@ class Client:
             self._busy = None
         for idx in suggested:
             self.sync_index(idx)
+        git.auto_midx(self.cachedir)
         if ob:
             self._busy = ob
             self.conn.write('%s\n' % ob)