Plugins/VcsPlugins/vcsPySvn/SvnPropListDialog.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 13
1af94a91f439
equal deleted inserted replaced
11:b0996e4a289e 12:1d8dd9706f46
13 import pysvn 13 import pysvn
14 14
15 from PyQt4.QtCore import * 15 from PyQt4.QtCore import *
16 from PyQt4.QtGui import * 16 from PyQt4.QtGui import *
17 17
18 from SvnDialogMixin import SvnDialogMixin 18 from .SvnDialogMixin import SvnDialogMixin
19 from Ui_SvnPropListDialog import Ui_SvnPropListDialog 19 from .Ui_SvnPropListDialog import Ui_SvnPropListDialog
20 20
21 class SvnPropListDialog(QWidget, SvnDialogMixin, Ui_SvnPropListDialog): 21 class SvnPropListDialog(QWidget, SvnDialogMixin, Ui_SvnPropListDialog):
22 """ 22 """
23 Class implementing a dialog to show the output of the svn proplist command process. 23 Class implementing a dialog to show the output of the svn proplist command process.
24 """ 24 """
82 """ 82 """
83 self.errorGroup.hide() 83 self.errorGroup.hide()
84 84
85 QApplication.processEvents() 85 QApplication.processEvents()
86 self.propsFound = False 86 self.propsFound = False
87 if type(fn) is types.ListType: 87 if isinstance(fn, list):
88 dname, fnames = self.vcs.splitPathList(fn) 88 dname, fnames = self.vcs.splitPathList(fn)
89 else: 89 else:
90 dname, fname = self.vcs.splitPath(fn) 90 dname, fname = self.vcs.splitPath(fn)
91 fnames = [fname] 91 fnames = [fname]
92 92
96 try: 96 try:
97 for name in fnames: 97 for name in fnames:
98 proplist = self.client.proplist(name, recurse = recursive) 98 proplist = self.client.proplist(name, recurse = recursive)
99 counter = 0 99 counter = 0
100 for path, prop in proplist: 100 for path, prop in proplist:
101 for propName, propVal in prop.items(): 101 for propName, propVal in list(prop.items()):
102 self.__generateItem(path, propName, propVal) 102 self.__generateItem(path, propName, propVal)
103 self.propsFound = True 103 self.propsFound = True
104 counter += 1 104 counter += 1
105 if counter == 30: 105 if counter == 30:
106 # check for cancel every 30 items 106 # check for cancel every 30 items
107 counter = 0 107 counter = 0
108 if self._clientCancelCallback(): 108 if self._clientCancelCallback():
109 break 109 break
110 if self._clientCancelCallback(): 110 if self._clientCancelCallback():
111 break 111 break
112 except pysvn.ClientError, e: 112 except pysvn.ClientError as e:
113 self.__showError(e.args[0]) 113 self.__showError(e.args[0])
114 locker.unlock() 114 locker.unlock()
115 self.__finish() 115 self.__finish()
116 os.chdir(cwd) 116 os.chdir(cwd)
117 117

eric ide

mercurial