Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py

changeset 12
1d8dd9706f46
parent 7
c679fb30c8f3
child 13
1af94a91f439
equal deleted inserted replaced
11:b0996e4a289e 12:1d8dd9706f46
10 import os 10 import os
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 SvnDiffDialog import SvnDiffDialog 15 from .SvnDiffDialog import SvnDiffDialog
16 16
17 from Ui_SvnLogBrowserDialog import Ui_SvnLogBrowserDialog 17 from .Ui_SvnLogBrowserDialog import Ui_SvnLogBrowserDialog
18 18
19 import UI.PixmapCache 19 import UI.PixmapCache
20 20
21 import Preferences 21 import Preferences
22 22
311 log["date"] = self.rx_rev2.cap(3) 311 log["date"] = self.rx_rev2.cap(3)
312 # number of lines is ignored 312 # number of lines is ignored
313 elif self.rx_flags1.exactMatch(s): 313 elif self.rx_flags1.exactMatch(s):
314 changedPaths.append({\ 314 changedPaths.append({\
315 "action" : 315 "action" :
316 unicode(self.rx_flags1.cap(1).strip(), ioEncoding, 'replace'), 316 str(self.rx_flags1.cap(1).strip(), ioEncoding, 'replace'),
317 "path" : 317 "path" :
318 unicode(self.rx_flags1.cap(2).strip(), ioEncoding, 'replace'), 318 str(self.rx_flags1.cap(2).strip(), ioEncoding, 'replace'),
319 "copyfrom_path" : 319 "copyfrom_path" :
320 unicode(self.rx_flags1.cap(3).strip(), ioEncoding, 'replace'), 320 str(self.rx_flags1.cap(3).strip(), ioEncoding, 'replace'),
321 "copyfrom_revision" : 321 "copyfrom_revision" :
322 unicode(self.rx_flags1.cap(4).strip(), ioEncoding, 'replace'), 322 str(self.rx_flags1.cap(4).strip(), ioEncoding, 'replace'),
323 }) 323 })
324 elif self.rx_flags2.exactMatch(s): 324 elif self.rx_flags2.exactMatch(s):
325 changedPaths.append({\ 325 changedPaths.append({\
326 "action" : 326 "action" :
327 unicode(self.rx_flags2.cap(1).strip(), ioEncoding, 'replace'), 327 str(self.rx_flags2.cap(1).strip(), ioEncoding, 'replace'),
328 "path" : 328 "path" :
329 unicode(self.rx_flags2.cap(2).strip(), ioEncoding, 'replace'), 329 str(self.rx_flags2.cap(2).strip(), ioEncoding, 'replace'),
330 "copyfrom_path" : "", 330 "copyfrom_path" : "",
331 "copyfrom_revision" : "", 331 "copyfrom_revision" : "",
332 }) 332 })
333 elif self.rx_sep1.exactMatch(s) or self.rx_sep2.exactMatch(s): 333 elif self.rx_sep1.exactMatch(s) or self.rx_sep2.exactMatch(s):
334 if len(log) > 1: 334 if len(log) > 1:
381 It reads the output of the process and inserts it into a buffer. 381 It reads the output of the process and inserts it into a buffer.
382 """ 382 """
383 self.process.setReadChannel(QProcess.StandardOutput) 383 self.process.setReadChannel(QProcess.StandardOutput)
384 384
385 while self.process.canReadLine(): 385 while self.process.canReadLine():
386 line = unicode(self.process.readLine()) 386 line = str(self.process.readLine(),
387 Preferences.getSystem("IOEncoding"),
388 'replace')
387 self.buf.append(line) 389 self.buf.append(line)
388 390
389 def __readStderr(self): 391 def __readStderr(self):
390 """ 392 """
391 Private slot to handle the readyReadStandardError signal. 393 Private slot to handle the readyReadStandardError signal.
392 394
393 It reads the error output of the process and inserts it into the 395 It reads the error output of the process and inserts it into the
394 error pane. 396 error pane.
395 """ 397 """
396 if self.process is not None: 398 if self.process is not None:
397 s = unicode(self.process.readAllStandardError()) 399 s = str(self.process.readAllStandardError(),
400 Preferences.getSystem("IOEncoding"),
401 'replace')
398 self.errors.insertPlainText(s) 402 self.errors.insertPlainText(s)
399 self.errors.ensureCursorVisible() 403 self.errors.ensureCursorVisible()
400 404
401 def __diffRevisions(self, rev1, rev2): 405 def __diffRevisions(self, rev1, rev2):
402 """ 406 """

eric ide

mercurial