4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing a dialog to show the guards of a selected patch. |
7 Module implementing a dialog to show the guards of a selected patch. |
8 """ |
8 """ |
9 |
|
10 import os |
|
11 |
9 |
12 from PyQt5.QtCore import pyqtSlot, Qt, QCoreApplication |
10 from PyQt5.QtCore import pyqtSlot, Qt, QCoreApplication |
13 from PyQt5.QtWidgets import QDialog, QListWidgetItem |
11 from PyQt5.QtWidgets import QDialog, QListWidgetItem |
14 |
12 |
15 from .Ui_HgQueuesListGuardsDialog import Ui_HgQueuesListGuardsDialog |
13 from .Ui_HgQueuesListGuardsDialog import Ui_HgQueuesListGuardsDialog |
50 if self.__hgClient.isExecuting(): |
48 if self.__hgClient.isExecuting(): |
51 self.__hgClient.cancel() |
49 self.__hgClient.cancel() |
52 |
50 |
53 e.accept() |
51 e.accept() |
54 |
52 |
55 def start(self, path): |
53 def start(self): |
56 """ |
54 """ |
57 Public slot to start the list command. |
55 Public slot to start the list command. |
58 |
|
59 @param path name of directory to be listed (string) |
|
60 """ |
56 """ |
61 dname, fname = self.vcs.splitPath(path) |
|
62 |
|
63 # find the root of the repo |
|
64 repodir = dname |
|
65 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): |
|
66 repodir = os.path.dirname(repodir) |
|
67 if os.path.splitdrive(repodir)[1] == os.sep: |
|
68 return |
|
69 |
|
70 self.__repodir = repodir |
|
71 self.on_patchSelector_activated("") |
57 self.on_patchSelector_activated("") |
72 |
58 |
73 @pyqtSlot(str) |
59 @pyqtSlot(str) |
74 def on_patchSelector_activated(self, patch): |
60 def on_patchSelector_activated(self, patch): |
75 """ |
61 """ |