eric6/Plugins/VcsPlugins/vcsPySvn/SvnChangeListsDialog.py

changeset 7774
9eed155411f0
parent 7771
787a6b3f8c9f
child 7923
91e843545d9a
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnChangeListsDialog.py	Sat Oct 10 15:17:29 2020 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnChangeListsDialog.py	Sat Oct 10 16:03:53 2020 +0200
@@ -11,11 +11,13 @@
 
 import pysvn
 
-from PyQt5.QtCore import pyqtSlot, Qt, QMutexLocker
+from PyQt5.QtCore import pyqtSlot, Qt
 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QListWidgetItem
 
 from E5Gui.E5OverrideCursor import E5OverrideCursor
 
+from E5Utilities.E5MutexLocker import E5MutexLocker
+
 from .SvnDialogMixin import SvnDialogMixin
 
 from .Ui_SvnChangeListsDialog import Ui_SvnChangeListsDialog
@@ -77,10 +79,10 @@
             self.tr("Files (relative to {0}):").format(path))
         
         with E5OverrideCursor():
-            locker = QMutexLocker(self.vcs.vcsExecutionMutex)
             try:
-                entries = self.client.get_changelist(
-                    path, depth=pysvn.depth.infinity)
+                with E5MutexLocker(self.vcs.vcsExecutionMutex):
+                    entries = self.client.get_changelist(
+                        path, depth=pysvn.depth.infinity)
                 for entry in entries:
                     file = entry[0]
                     changelist = entry[1]
@@ -90,7 +92,6 @@
                     if filename not in self.changeListsDict[changelist]:
                         self.changeListsDict[changelist].append(filename)
             except pysvn.ClientError as e:
-                locker.unlock()
                 self.__showError(e.args[0])
         self.__finish()
     

eric ide

mercurial