9 |
9 |
10 import os |
10 import os |
11 |
11 |
12 import pysvn |
12 import pysvn |
13 |
13 |
14 from PyQt5.QtCore import pyqtSlot, Qt, QMutexLocker |
14 from PyQt5.QtCore import pyqtSlot, Qt |
15 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QListWidgetItem |
15 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QListWidgetItem |
16 |
16 |
17 from E5Gui.E5OverrideCursor import E5OverrideCursor |
17 from E5Gui.E5OverrideCursor import E5OverrideCursor |
|
18 |
|
19 from E5Utilities.E5MutexLocker import E5MutexLocker |
18 |
20 |
19 from .SvnDialogMixin import SvnDialogMixin |
21 from .SvnDialogMixin import SvnDialogMixin |
20 |
22 |
21 from .Ui_SvnChangeListsDialog import Ui_SvnChangeListsDialog |
23 from .Ui_SvnChangeListsDialog import Ui_SvnChangeListsDialog |
22 |
24 |
75 |
77 |
76 self.filesLabel.setText( |
78 self.filesLabel.setText( |
77 self.tr("Files (relative to {0}):").format(path)) |
79 self.tr("Files (relative to {0}):").format(path)) |
78 |
80 |
79 with E5OverrideCursor(): |
81 with E5OverrideCursor(): |
80 locker = QMutexLocker(self.vcs.vcsExecutionMutex) |
|
81 try: |
82 try: |
82 entries = self.client.get_changelist( |
83 with E5MutexLocker(self.vcs.vcsExecutionMutex): |
83 path, depth=pysvn.depth.infinity) |
84 entries = self.client.get_changelist( |
|
85 path, depth=pysvn.depth.infinity) |
84 for entry in entries: |
86 for entry in entries: |
85 file = entry[0] |
87 file = entry[0] |
86 changelist = entry[1] |
88 changelist = entry[1] |
87 if changelist not in self.changeListsDict: |
89 if changelist not in self.changeListsDict: |
88 self.changeListsDict[changelist] = [] |
90 self.changeListsDict[changelist] = [] |
89 filename = file.replace(path + os.sep, "") |
91 filename = file.replace(path + os.sep, "") |
90 if filename not in self.changeListsDict[changelist]: |
92 if filename not in self.changeListsDict[changelist]: |
91 self.changeListsDict[changelist].append(filename) |
93 self.changeListsDict[changelist].append(filename) |
92 except pysvn.ClientError as e: |
94 except pysvn.ClientError as e: |
93 locker.unlock() |
|
94 self.__showError(e.args[0]) |
95 self.__showError(e.args[0]) |
95 self.__finish() |
96 self.__finish() |
96 |
97 |
97 def __finish(self): |
98 def __finish(self): |
98 """ |
99 """ |