eric6/Plugins/VcsPlugins/vcsPySvn/SvnTagBranchListDialog.py

changeset 7774
9eed155411f0
parent 7639
422fd05e9c91
child 7775
4a1db75550bd
equal deleted inserted replaced
7773:fe42bd17d4fe 7774:9eed155411f0
10 10
11 import os 11 import os
12 12
13 import pysvn 13 import pysvn
14 14
15 from PyQt5.QtCore import QMutexLocker, QRegExp, Qt 15 from PyQt5.QtCore import QRegExp, Qt
16 from PyQt5.QtWidgets import ( 16 from PyQt5.QtWidgets import (
17 QHeaderView, QLineEdit, QDialog, QInputDialog, QApplication, 17 QHeaderView, QLineEdit, QDialog, QInputDialog, QApplication,
18 QDialogButtonBox, QTreeWidgetItem 18 QDialogButtonBox, QTreeWidgetItem
19 ) 19 )
20 20
21 from E5Gui import E5MessageBox 21 from E5Gui import E5MessageBox
22
23 from E5Utilities.E5MutexLocker import E5MutexLocker
22 24
23 from .SvnUtilities import formatTime 25 from .SvnUtilities import formatTime
24 26
25 from .SvnDialogMixin import SvnDialogMixin 27 from .SvnDialogMixin import SvnDialogMixin
26 from .Ui_SvnTagBranchListDialog import Ui_SvnTagBranchListDialog 28 from .Ui_SvnTagBranchListDialog import Ui_SvnTagBranchListDialog
128 """The repository URL is empty. Aborting...""")) 130 """The repository URL is empty. Aborting..."""))
129 self.close() 131 self.close()
130 return False 132 return False
131 path = reposPath 133 path = reposPath
132 134
133 locker = QMutexLocker(self.vcs.vcsExecutionMutex)
134 self.tagsList = [] 135 self.tagsList = []
135 cwd = os.getcwd() 136 cwd = os.getcwd()
136 os.chdir(dname) 137 os.chdir(dname)
137 try: 138 try:
138 entries = self.client.list(path, recurse=False) 139 with E5MutexLocker(self.vcs.vcsExecutionMutex):
140 entries = self.client.list(path, recurse=False)
139 for dirent, _lock in entries: 141 for dirent, _lock in entries:
140 if dirent["path"] != path: 142 if dirent["path"] != path:
141 name = dirent["path"].replace(path + '/', "") 143 name = dirent["path"].replace(path + '/', "")
142 self.__generateItem(dirent["created_rev"].number, 144 self.__generateItem(dirent["created_rev"].number,
143 dirent["last_author"], 145 dirent["last_author"],
156 except AttributeError: 158 except AttributeError:
157 self.__showError( 159 self.__showError(
158 self.tr("The installed version of PySvn should be" 160 self.tr("The installed version of PySvn should be"
159 " 1.4.0 or better.")) 161 " 1.4.0 or better."))
160 res = False 162 res = False
161 locker.unlock()
162 self.__finish() 163 self.__finish()
163 os.chdir(cwd) 164 os.chdir(cwd)
164 return res 165 return res
165 166
166 def __finish(self): 167 def __finish(self):

eric ide

mercurial