Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py

changeset 3302
e92f0dd51979
parent 3190
a9a94491c4fd
child 3484
645c12de6b0c
equal deleted inserted replaced
3300:734353e7d679 3302:e92f0dd51979
108 self.contents.clear() 108 self.contents.clear()
109 self.paras = 0 109 self.paras = 0
110 110
111 self.filesCombo.clear() 111 self.filesCombo.clear()
112 112
113 args = []
114 if qdiff: 113 if qdiff:
115 args.append('qdiff') 114 args = self.vcs.initCommand("qdiff")
116 self.setWindowTitle(self.tr("Patch Contents")) 115 self.setWindowTitle(self.tr("Patch Contents"))
117 else: 116 else:
118 args.append('diff') 117 args = self.vcs.initCommand("diff")
119 self.vcs.addArguments(args, self.vcs.options['global'])
120 self.vcs.addArguments(args, self.vcs.options['diff'])
121 118
122 if self.vcs.hasSubrepositories(): 119 if self.vcs.hasSubrepositories():
123 args.append("--subrepos") 120 args.append("--subrepos")
124 121
125 if bundle: 122 if bundle:
310 the contents pane. 307 the contents pane.
311 """ 308 """
312 self.process.setReadChannel(QProcess.StandardOutput) 309 self.process.setReadChannel(QProcess.StandardOutput)
313 310
314 while self.process.canReadLine(): 311 while self.process.canReadLine():
315 line = str(self.process.readLine(), 312 line = str(self.process.readLine(), self.vcs.getEncoding(),
316 Preferences.getSystem("IOEncoding"),
317 'replace') 313 'replace')
318 self.__processOutputLine(line) 314 self.__processOutputLine(line)
319 315
320 def __readStderr(self): 316 def __readStderr(self):
321 """ 317 """
324 It reads the error output of the process and inserts it into the 320 It reads the error output of the process and inserts it into the
325 error pane. 321 error pane.
326 """ 322 """
327 if self.process is not None: 323 if self.process is not None:
328 s = str(self.process.readAllStandardError(), 324 s = str(self.process.readAllStandardError(),
329 Preferences.getSystem("IOEncoding"), 325 self.vcs.getEncoding(), 'replace')
330 'replace')
331 self.__showError(s) 326 self.__showError(s)
332 327
333 def __showError(self, out): 328 def __showError(self, out):
334 """ 329 """
335 Private slot to show some error. 330 Private slot to show some error.

eric ide

mercurial