eric6/Plugins/VcsPlugins/vcsPySvn/SvnTagBranchListDialog.py

changeset 7774
9eed155411f0
parent 7639
422fd05e9c91
child 7775
4a1db75550bd
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnTagBranchListDialog.py	Sat Oct 10 15:17:29 2020 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnTagBranchListDialog.py	Sat Oct 10 16:03:53 2020 +0200
@@ -12,7 +12,7 @@
 
 import pysvn
 
-from PyQt5.QtCore import QMutexLocker, QRegExp, Qt
+from PyQt5.QtCore import QRegExp, Qt
 from PyQt5.QtWidgets import (
     QHeaderView, QLineEdit, QDialog, QInputDialog, QApplication,
     QDialogButtonBox, QTreeWidgetItem
@@ -20,6 +20,8 @@
 
 from E5Gui import E5MessageBox
 
+from E5Utilities.E5MutexLocker import E5MutexLocker
+
 from .SvnUtilities import formatTime
 
 from .SvnDialogMixin import SvnDialogMixin
@@ -130,12 +132,12 @@
                 return False
             path = reposPath
         
-        locker = QMutexLocker(self.vcs.vcsExecutionMutex)
         self.tagsList = []
         cwd = os.getcwd()
         os.chdir(dname)
         try:
-            entries = self.client.list(path, recurse=False)
+            with E5MutexLocker(self.vcs.vcsExecutionMutex):
+                entries = self.client.list(path, recurse=False)
             for dirent, _lock in entries:
                 if dirent["path"] != path:
                     name = dirent["path"].replace(path + '/', "")
@@ -158,7 +160,6 @@
                 self.tr("The installed version of PySvn should be"
                         " 1.4.0 or better."))
             res = False
-        locker.unlock()
         self.__finish()
         os.chdir(cwd)
         return res

eric ide

mercurial