Plugins/VcsPlugins/vcsMercurial/HgServeDialog.py

changeset 3302
e92f0dd51979
parent 3190
a9a94491c4fd
child 3345
071afe8be2a1
equal deleted inserted replaced
3300:734353e7d679 3302:e92f0dd51979
112 Private slot to start the Mercurial server. 112 Private slot to start the Mercurial server.
113 """ 113 """
114 port = self.__portSpin.value() 114 port = self.__portSpin.value()
115 style = self.__styleCombo.currentText() 115 style = self.__styleCombo.currentText()
116 116
117 args = [] 117 args = self.vcs.initCommand("serve")
118 args.append("serve")
119 args.append("-v") 118 args.append("-v")
120 args.append("--port") 119 args.append("--port")
121 args.append(str(port)) 120 args.append(str(port))
122 args.append("--style") 121 args.append("--style")
123 args.append(style) 122 args.append(style)
191 190
192 It reads the output of the process and inserts it into the log. 191 It reads the output of the process and inserts it into the log.
193 """ 192 """
194 if self.process is not None: 193 if self.process is not None:
195 s = str(self.process.readAllStandardOutput(), 194 s = str(self.process.readAllStandardOutput(),
196 Preferences.getSystem("IOEncoding"), 195 self.vcs.getEncoding(), 'replace')
197 'replace')
198 self.__appendText(s, False) 196 self.__appendText(s, False)
199 197
200 def __readStderr(self): 198 def __readStderr(self):
201 """ 199 """
202 Private slot to handle the readyReadStandardError signal. 200 Private slot to handle the readyReadStandardError signal.
203 201
204 It reads the error output of the process and inserts it into the log. 202 It reads the error output of the process and inserts it into the log.
205 """ 203 """
206 if self.process is not None: 204 if self.process is not None:
207 s = str(self.process.readAllStandardError(), 205 s = str(self.process.readAllStandardError(),
208 Preferences.getSystem("IOEncoding"), 206 self.vcs.getEncoding(), 'replace')
209 'replace')
210 self.__appendText(s, True) 207 self.__appendText(s, True)
211 208
212 def __appendText(self, txt, error=False): 209 def __appendText(self, txt, error=False):
213 """ 210 """
214 Public method to append text to the end. 211 Public method to append text to the end.

eric ide

mercurial