Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py

changeset 3302
e92f0dd51979
parent 3190
a9a94491c4fd
child 3315
bd1a25ead18d
equal deleted inserted replaced
3300:734353e7d679 3302:e92f0dd51979
216 self.setWindowTitle( 216 self.setWindowTitle(
217 self.tr("Mercurial Queue Repository Status")) 217 self.tr("Mercurial Queue Repository Status"))
218 else: 218 else:
219 self.setWindowTitle(self.tr('Mercurial Status')) 219 self.setWindowTitle(self.tr('Mercurial Status'))
220 220
221 args = [] 221 args = self.vcs.initCommand("status")
222 args.append('status')
223 self.vcs.addArguments(args, self.vcs.options['global'])
224 if self.__mq: 222 if self.__mq:
225 args.append('--mq') 223 args.append('--mq')
226 if isinstance(fn, list): 224 if isinstance(fn, list):
227 self.dname, fnames = self.vcs.splitPathList(fn) 225 self.dname, fnames = self.vcs.splitPathList(fn)
228 else: 226 else:
229 self.dname, fname = self.vcs.splitPath(fn) 227 self.dname, fname = self.vcs.splitPath(fn)
230 else: 228 else:
231 self.vcs.addArguments(args, self.vcs.options['status'])
232
233 if self.vcs.hasSubrepositories(): 229 if self.vcs.hasSubrepositories():
234 args.append("--subrepos") 230 args.append("--subrepos")
235 231
236 if isinstance(fn, list): 232 if isinstance(fn, list):
237 self.dname, fnames = self.vcs.splitPathList(fn) 233 self.dname, fnames = self.vcs.splitPathList(fn)
357 """ 353 """
358 if self.process is not None: 354 if self.process is not None:
359 self.process.setReadChannel(QProcess.StandardOutput) 355 self.process.setReadChannel(QProcess.StandardOutput)
360 356
361 while self.process.canReadLine(): 357 while self.process.canReadLine():
362 line = str( 358 line = str(self.process.readLine(), self.vcs.getEncoding(),
363 self.process.readLine(), 359 'replace')
364 Preferences.getSystem("IOEncoding"),
365 'replace')
366 self.__processOutputLine(line) 360 self.__processOutputLine(line)
367 361
368 def __processOutputLine(self, line): 362 def __processOutputLine(self, line):
369 """ 363 """
370 Private method to process the lines of output. 364 Private method to process the lines of output.
382 It reads the error output of the process and inserts it into the 376 It reads the error output of the process and inserts it into the
383 error pane. 377 error pane.
384 """ 378 """
385 if self.process is not None: 379 if self.process is not None:
386 s = str(self.process.readAllStandardError(), 380 s = str(self.process.readAllStandardError(),
387 Preferences.getSystem("IOEncoding"), 381 self.vcs.getEncoding(), 'replace')
388 'replace')
389 self.__showError(s) 382 self.__showError(s)
390 383
391 def __showError(self, out): 384 def __showError(self, out):
392 """ 385 """
393 Private slot to show some error. 386 Private slot to show some error.

eric ide

mercurial