mercurial/commandserver.py
branchstable
changeset 14707 964a72038bb0
parent 14706 5fd5dd9a610a
child 14719 c19de7f32961
equal deleted inserted replaced
14706:5fd5dd9a610a 14707:964a72038bb0
   169     def runcommand(self):
   169     def runcommand(self):
   170         """ reads a list of \0 terminated arguments, executes
   170         """ reads a list of \0 terminated arguments, executes
   171         and writes the return code to the result channel """
   171         and writes the return code to the result channel """
   172 
   172 
   173         length = struct.unpack('>I', self._read(4))[0]
   173         length = struct.unpack('>I', self._read(4))[0]
   174         args = self._read(length).split('\0')
   174         if not length:
       
   175             args = []
       
   176         else:
       
   177             args = self._read(length).split('\0')
   175 
   178 
   176         # copy the ui so changes to it don't persist between requests
   179         # copy the ui so changes to it don't persist between requests
   177         req = dispatch.request(args, self.ui.copy(), self.repo, self.cin,
   180         req = dispatch.request(args, self.ui.copy(), self.repo, self.cin,
   178                                self.cout, self.cerr)
   181                                self.cout, self.cerr)
   179 
   182