|
@@ -617,15 +617,26 @@ class ReceivePackHandler(Handler):
|
|
|
AssertionError, socket.error, zlib.error,
|
|
|
ObjectFormatException)
|
|
|
status = []
|
|
|
-
|
|
|
- try:
|
|
|
- recv = getattr(self.proto, "recv", None)
|
|
|
- p = self.repo.object_store.add_thin_pack(self.proto.read, recv)
|
|
|
+ will_send_pack = False
|
|
|
+
|
|
|
+ for command in refs:
|
|
|
+ if command[1] != ZERO_SHA:
|
|
|
+ will_send_pack = True
|
|
|
+
|
|
|
+ if will_send_pack:
|
|
|
+
|
|
|
+ try:
|
|
|
+ recv = getattr(self.proto, "recv", None)
|
|
|
+ p = self.repo.object_store.add_thin_pack(self.proto.read, recv)
|
|
|
+ status.append(('unpack', 'ok'))
|
|
|
+ except all_exceptions, e:
|
|
|
+ status.append(('unpack', str(e).replace('\n', '')))
|
|
|
+
|
|
|
+
|
|
|
+ else:
|
|
|
+
|
|
|
+
|
|
|
status.append(('unpack', 'ok'))
|
|
|
- except all_exceptions, e:
|
|
|
- status.append(('unpack', str(e).replace('\n', '')))
|
|
|
-
|
|
|
-
|
|
|
|
|
|
for oldsha, sha, ref in refs:
|
|
|
ref_status = 'ok'
|