cmdserver: fix read-loop string concatenation stable
authorIdan Kamara <idankk86@gmail.com>
Fri, 24 Jun 2011 16:36:24 +0300
branchstable
changeset 14728 350dcd481410
parent 14727 d4b9d3b91ce7
child 14729 94eea58da2a3
cmdserver: fix read-loop string concatenation
mercurial/commandserver.py
--- a/mercurial/commandserver.py	Fri Jun 24 16:30:43 2011 +0300
+++ b/mercurial/commandserver.py	Fri Jun 24 16:36:24 2011 +0300
@@ -73,8 +73,8 @@
             s = self._read(size, self.channel)
             buf = s
             while s:
+                s = self._read(size, self.channel)
                 buf += s
-                s = self._read(size, self.channel)
 
             return buf
         else:
@@ -104,8 +104,8 @@
             # keep asking for more until there's either no more or
             # we got a full line
             while s and s[-1] != '\n':
+                s = self._read(size, 'L')
                 buf += s
-                s = self._read(size, 'L')
 
             return buf
         else: