commandserver: use _readlist
Use _readlist introduced in previous commit to make the code shorter.
--- a/mercurial/commandserver.py Tue Feb 16 19:11:45 2016 +0000
+++ b/mercurial/commandserver.py Mon Feb 15 14:20:41 2016 +0000
@@ -214,11 +214,7 @@
and writes the return code to the result channel """
from . import dispatch # avoid cycle
- length = struct.unpack('>I', self._read(4))[0]
- if not length:
- args = []
- else:
- args = self._read(length).split('\0')
+ args = self._readlist()
# copy the uis so changes (e.g. --config or --verbose) don't
# persist between requests