]> arthur.barton.de Git - bup.git/commitdiff
Rename receive-objects command to receive-objects-v2.
authorAvery Pennarun <apenwarr@gmail.com>
Mon, 3 Jan 2011 04:38:44 +0000 (20:38 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Mon, 3 Jan 2011 04:39:47 +0000 (20:39 -0800)
...since it's incompatible with the old one.  That will make it die more
spectacularly when talking to an old-style server, rather than failing in
more confusing ways.

Theoretically we could do fancy things like making our server support both
variants of receive-objects, but hey, bup is a pre-release, it shouldn't be
acquiring backwards compatibility cruft *already* :)

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
cmd/server-cmd.py
lib/bup/client.py

index 03667a2e9825a776398478768167982387c4af14..e44f302c7d7a7c8332b13141a107374702d1c022 100755 (executable)
@@ -36,7 +36,7 @@ def send_index(conn, name):
     conn.ok()
 
 
-def receive_objects(conn, junk):
+def receive_objects_v2(conn, junk):
     global suspended_w
     git.check_repo_or_die()
     suggested = {}
@@ -165,7 +165,7 @@ commands = {
     'set-dir': set_dir,
     'list-indexes': list_indexes,
     'send-index': send_index,
-    'receive-objects': receive_objects,
+    'receive-objects-v2': receive_objects_v2,
     'read-ref': read_ref,
     'update-ref': update_ref,
     'cat': cat,
index aa9978ba5bacf4d7040285fbf9d30c7098a58c86..c65ec0cef8caa9e6fbc90ade9446be4a91265dcb 100644 (file)
@@ -169,20 +169,20 @@ class Client:
         debug1('client: received index suggestion: %s\n' % indexname)
         ob = self._busy
         if ob:
-            assert(ob == 'receive-objects')
+            assert(ob == 'receive-objects-v2')
             self.conn.write('\xff\xff\xff\xff')  # suspend receive-objects
             self._busy = None
             self.conn.drain_and_check_ok()
         self.sync_index(indexname)
         if ob:
             self._busy = ob
-            self.conn.write('receive-objects\n')
+            self.conn.write('receive-objects-v2\n')
 
     def new_packwriter(self):
         self.check_busy()
         def _set_busy():
-            self._busy = 'receive-objects'
-            self.conn.write('receive-objects\n')
+            self._busy = 'receive-objects-v2'
+            self.conn.write('receive-objects-v2\n')
         return PackWriter_Remote(self.conn,
                                  objcache_maker = self._make_objcache,
                                  suggest_pack = self._suggest_pack,