mercurial/commandserver.py
changeset 28157 e7c9b59dbbcf
parent 28156 75f586a1bf55
child 28511 ff5f923fca3c
equal deleted inserted replaced
28156:75f586a1bf55 28157:e7c9b59dbbcf
   212     def runcommand(self):
   212     def runcommand(self):
   213         """ reads a list of \0 terminated arguments, executes
   213         """ reads a list of \0 terminated arguments, executes
   214         and writes the return code to the result channel """
   214         and writes the return code to the result channel """
   215         from . import dispatch  # avoid cycle
   215         from . import dispatch  # avoid cycle
   216 
   216 
   217         length = struct.unpack('>I', self._read(4))[0]
   217         args = self._readlist()
   218         if not length:
       
   219             args = []
       
   220         else:
       
   221             args = self._read(length).split('\0')
       
   222 
   218 
   223         # copy the uis so changes (e.g. --config or --verbose) don't
   219         # copy the uis so changes (e.g. --config or --verbose) don't
   224         # persist between requests
   220         # persist between requests
   225         copiedui = self.ui.copy()
   221         copiedui = self.ui.copy()
   226         uis = [copiedui]
   222         uis = [copiedui]