]> arthur.barton.de Git - bup.git/commitdiff
splitting to a remote server would cause "already busy" errors. bup-0.03
authorAvery Pennarun <apenwarr@gmail.com>
Wed, 6 Jan 2010 21:42:54 +0000 (16:42 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 6 Jan 2010 22:06:15 +0000 (17:06 -0500)
Specifically:
client.ClientError: already busy with command 'receive-objects'

That's because recent changes removed the call to onclose() from
PackWriter_Remote.  Now it's back, plus I added an extra unit test to reveal
the problem.

client.py
test-sh

index ad4fd2dbdab87c5a80e6185e2fcf001b196c74ea..c8e0818715b94d8e02cbb59f8fc58ea2e1b2c380 100644 (file)
--- a/client.py
+++ b/client.py
@@ -199,6 +199,8 @@ class PackWriter_Remote(git.PackWriter):
             id = self.file.readline().strip()
             self.file.check_ok()
             self.objcache = None
+            if self.onclose:
+                self.onclose()
             return id
 
     def close(self):
diff --git a/test-sh b/test-sh
index 91fde5968568b89f5a801acab56cc0f2d00167a8..d2583a7fd0f68be7f8d7fdf498a01a62702a5a22 100755 (executable)
--- a/test-sh
+++ b/test-sh
@@ -18,6 +18,7 @@ bup split -vvvv -b testfile2 >tags2.tmp
 bup split -t testfile2 >tags2t.tmp
 bup split -t testfile2 --fanout 3 >tags2tf.tmp
 bup split -r "$BUP_DIR" -c testfile2 >tags2c.tmp
+ls -lR | bup split -r "$BUP_DIR" -c --fanout 3 --max-pack-objects 3 -n lslr
 diff -u tags1.tmp tags2.tmp || true
 if diff -q tags2t.tmp tags2tf.tmp; then
     echo "fanout tree same as non-fanout tree!?"