Plugins/VcsPlugins/vcsSubversion/SvnPropListDialog.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 13
1af94a91f439
equal deleted inserted replaced
11:b0996e4a289e 12:1d8dd9706f46
10 import types 10 import types
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_SvnPropListDialog import Ui_SvnPropListDialog 15 from .Ui_SvnPropListDialog import Ui_SvnPropListDialog
16
17 import Preferences
16 18
17 class SvnPropListDialog(QWidget, Ui_SvnPropListDialog): 19 class SvnPropListDialog(QWidget, Ui_SvnPropListDialog):
18 """ 20 """
19 Class implementing a dialog to show the output of the svn proplist command process. 21 Class implementing a dialog to show the output of the svn proplist command process.
20 """ 22 """
103 args.append('proplist') 105 args.append('proplist')
104 self.vcs.addArguments(args, self.vcs.options['global']) 106 self.vcs.addArguments(args, self.vcs.options['global'])
105 args.append('--verbose') 107 args.append('--verbose')
106 if recursive: 108 if recursive:
107 args.append('--recursive') 109 args.append('--recursive')
108 if type(fn) is types.ListType: 110 if isinstance(fn, list):
109 dname, fnames = self.vcs.splitPathList(fn) 111 dname, fnames = self.vcs.splitPathList(fn)
110 self.vcs.addArguments(args, fnames) 112 self.vcs.addArguments(args, fnames)
111 else: 113 else:
112 dname, fname = self.vcs.splitPath(fn) 114 dname, fname = self.vcs.splitPath(fn)
113 args.append(fname) 115 args.append(fname)
176 the contents pane. 178 the contents pane.
177 """ 179 """
178 self.process.setReadChannel(QProcess.StandardOutput) 180 self.process.setReadChannel(QProcess.StandardOutput)
179 181
180 while self.process.canReadLine(): 182 while self.process.canReadLine():
181 s = unicode(self.process.readLine()) 183 s = str(self.process.readLine(),
184 Preferences.getSystem("IOEncoding"),
185 'replace')
182 if self.rx_path.exactMatch(s): 186 if self.rx_path.exactMatch(s):
183 if self.lastProp: 187 if self.lastProp:
184 self.__generateItem(self.lastPath, self.lastProp, self.propBuffer) 188 self.__generateItem(self.lastPath, self.lastProp, self.propBuffer)
185 self.lastPath = self.rx_path.cap(1) 189 self.lastPath = self.rx_path.cap(1)
186 self.lastProp = None 190 self.lastProp = None
201 It reads the error output of the process and inserts it into the 205 It reads the error output of the process and inserts it into the
202 error pane. 206 error pane.
203 """ 207 """
204 if self.process is not None: 208 if self.process is not None:
205 self.errorGroup.show() 209 self.errorGroup.show()
206 s = unicode(self.process.readAllStandardError()) 210 s = str(self.process.readAllStandardError(),
211 Preferences.getSystem("IOEncoding"),
212 'replace')
207 self.errors.insertPlainText(s) 213 self.errors.insertPlainText(s)
208 self.errors.ensureCursorVisible() 214 self.errors.ensureCursorVisible()

eric ide

mercurial