mercurial/commandserver.py
branchstable
changeset 14707 964a72038bb0
parent 14706 5fd5dd9a610a
child 14719 c19de7f32961
--- a/mercurial/commandserver.py	Tue Jun 21 15:13:39 2011 +0300
+++ b/mercurial/commandserver.py	Tue Jun 21 15:38:10 2011 +0300
@@ -171,7 +171,10 @@
         and writes the return code to the result channel """
 
         length = struct.unpack('>I', self._read(4))[0]
-        args = self._read(length).split('\0')
+        if not length:
+            args = []
+        else:
+            args = self._read(length).split('\0')
 
         # copy the ui so changes to it don't persist between requests
         req = dispatch.request(args, self.ui.copy(), self.repo, self.cin,