Plugins/VcsPlugins/vcsSubversion/SvnBlameDialog.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 13
1af94a91f439
equal deleted inserted replaced
11:b0996e4a289e 12:1d8dd9706f46
10 import sys 10 import sys
11 11
12 from PyQt4.QtCore import * 12 from PyQt4.QtCore import *
13 from PyQt4.QtGui import * 13 from PyQt4.QtGui import *
14 14
15 from Ui_SvnBlameDialog import Ui_SvnBlameDialog 15 from .Ui_SvnBlameDialog import Ui_SvnBlameDialog
16 16
17 import Preferences 17 import Preferences
18 import Utilities 18 import Utilities
19 19
20 class SvnBlameDialog(QDialog, Ui_SvnBlameDialog): 20 class SvnBlameDialog(QDialog, Ui_SvnBlameDialog):
175 the contents pane. 175 the contents pane.
176 """ 176 """
177 self.process.setReadChannel(QProcess.StandardOutput) 177 self.process.setReadChannel(QProcess.StandardOutput)
178 178
179 while self.process.canReadLine(): 179 while self.process.canReadLine():
180 s = unicode(self.process.readLine(), self.__ioEncoding, 'replace').strip() 180 s = str(self.process.readLine(), self.__ioEncoding, 'replace').strip()
181 rev, s = s.split(None, 1) 181 rev, s = s.split(None, 1)
182 try: 182 try:
183 author, text = s.split(' ', 1) 183 author, text = s.split(' ', 1)
184 except ValueError: 184 except ValueError:
185 author = s.strip() 185 author = s.strip()
193 It reads the error output of the process and inserts it into the 193 It reads the error output of the process and inserts it into the
194 error pane. 194 error pane.
195 """ 195 """
196 if self.process is not None: 196 if self.process is not None:
197 self.errorGroup.show() 197 self.errorGroup.show()
198 s = unicode(self.process.readAllStandardError()) 198 s = str(self.process.readAllStandardError(),
199 Preferences.getSystem("IOEncoding"),
200 'replace')
199 self.errors.insertPlainText(s) 201 self.errors.insertPlainText(s)
200 self.errors.ensureCursorVisible() 202 self.errors.ensureCursorVisible()
201 203
202 def on_passwordCheckBox_toggled(self, isOn): 204 def on_passwordCheckBox_toggled(self, isOn):
203 """ 205 """

eric ide

mercurial