Plugins/VcsPlugins/vcsSubversion/SvnPropListDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2791
a9577f248f04
parent 3009
bf5ae5d7477d
child 3058
0a02c433f52d
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
2 2
3 # Copyright (c) 2003 - 2013 Detlev Offenbach <detlev@die-offenbachs.de> 3 # Copyright (c) 2003 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog to show the output of the svn proplist command process. 7 Module implementing a dialog to show the output of the svn proplist command
8 process.
8 """ 9 """
9 10
10 from __future__ import unicode_literals # __IGNORE_WARNING__ 11 from __future__ import unicode_literals # __IGNORE_WARNING__
11 try: 12 try:
12 str = unicode 13 str = unicode
23 import Preferences 24 import Preferences
24 25
25 26
26 class SvnPropListDialog(QWidget, Ui_SvnPropListDialog): 27 class SvnPropListDialog(QWidget, Ui_SvnPropListDialog):
27 """ 28 """
28 Class implementing a dialog to show the output of the svn proplist command process. 29 Class implementing a dialog to show the output of the svn proplist command
30 process.
29 """ 31 """
30 def __init__(self, vcs, parent=None): 32 def __init__(self, vcs, parent=None):
31 """ 33 """
32 Constructor 34 Constructor
33 35
133 'Ensure, that it is in the search path.' 135 'Ensure, that it is in the search path.'
134 ).format('svn')) 136 ).format('svn'))
135 137
136 def __finish(self): 138 def __finish(self):
137 """ 139 """
138 Private slot called when the process finished or the user pressed the button. 140 Private slot called when the process finished or the user pressed the
141 button.
139 """ 142 """
140 if self.process is not None and \ 143 if self.process is not None and \
141 self.process.state() != QProcess.NotRunning: 144 self.process.state() != QProcess.NotRunning:
142 self.process.terminate() 145 self.process.terminate()
143 QTimer.singleShot(2000, self.process.kill) 146 QTimer.singleShot(2000, self.process.kill)
190 s = str(self.process.readLine(), 193 s = str(self.process.readLine(),
191 Preferences.getSystem("IOEncoding"), 194 Preferences.getSystem("IOEncoding"),
192 'replace') 195 'replace')
193 if self.rx_path.exactMatch(s): 196 if self.rx_path.exactMatch(s):
194 if self.lastProp: 197 if self.lastProp:
195 self.__generateItem(self.lastPath, self.lastProp, self.propBuffer) 198 self.__generateItem(
199 self.lastPath, self.lastProp, self.propBuffer)
196 self.lastPath = self.rx_path.cap(1) 200 self.lastPath = self.rx_path.cap(1)
197 self.lastProp = None 201 self.lastProp = None
198 self.propBuffer = "" 202 self.propBuffer = ""
199 elif self.rx_prop.exactMatch(s): 203 elif self.rx_prop.exactMatch(s):
200 if self.lastProp: 204 if self.lastProp:
201 self.__generateItem(self.lastPath, self.lastProp, self.propBuffer) 205 self.__generateItem(
206 self.lastPath, self.lastProp, self.propBuffer)
202 self.lastProp = self.rx_prop.cap(1) 207 self.lastProp = self.rx_prop.cap(1)
203 self.propBuffer = self.rx_prop.cap(2) 208 self.propBuffer = self.rx_prop.cap(2)
204 else: 209 else:
205 self.propBuffer += ' ' 210 self.propBuffer += ' '
206 self.propBuffer += s 211 self.propBuffer += s

eric ide

mercurial