John Carr 16 роки тому
батько
коміт
21502005d8
2 змінених файлів з 5 додано та 4 видалено
  1. 3 2
      bin/dul-daemon
  2. 2 2
      dulwich/server.py

+ 3 - 2
bin/dul-daemon

@@ -23,6 +23,7 @@ from dulwich.repo import Repo
 from dulwich.pack import PackData, Pack
 
 import sha
+from dulwich.pack import write_pack_object
 class PackWriteWrapper(object):
 
     def __init__(self, write):
@@ -102,8 +103,8 @@ class GitBackend(Backend):
 
         w = PackWriteWrapper(write)
         w.write("PACK")
-        w.write(struct.pack(">L", 2)
-        w.write(struct.pack(">L", len(sha_queue)) 
+        w.write(struct.pack(">L", 2))
+        w.write(struct.pack(">L", len(sha_queue)))
 
         for type, sha in sha_queue:
             obj = self.repo.get_object(sha)

+ 2 - 2
dulwich/server.py

@@ -129,7 +129,7 @@ class UploadPackHandler(Handler):
         # Keep reading the list of demands until we hit another "0000" 
         want_revs = []
         while want and want[:4] == 'want':
-            want_rev = want[5:40]
+            want_rev = want[5:45]
             # FIXME: This check probably isnt needed?
             if self.backend.has_revision(want_rev):
                want_revs.append(want_rev)
@@ -141,7 +141,7 @@ class UploadPackHandler(Handler):
         have_revs = []
         have = self.read_pkt_line()
         while have and have[:4] == 'have':
-            have_ref = have[6:40]
+            have_ref = have[6:46]
             if self.backend.has_revision(hav_rev):
                 self.write_pkt_line("ACK %s continue\n" % sha)
                 last_sha = sha