eric6/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListAllGuardsDialog.py

changeset 7971
ff2971513d6d
parent 7923
91e843545d9a
child 8143
2c730d5fd177
equal deleted inserted replaced
7970:c4ee8a81584c 7971:ff2971513d6d
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog to show all guards for all patches. 7 Module implementing a dialog to show all guards for all patches.
8 """ 8 """
9
10 import os
11 9
12 from PyQt5.QtCore import Qt, QCoreApplication 10 from PyQt5.QtCore import Qt, QCoreApplication
13 from PyQt5.QtWidgets import QDialog, QTreeWidgetItem 11 from PyQt5.QtWidgets import QDialog, QTreeWidgetItem
14 12
15 from .Ui_HgQueuesListAllGuardsDialog import Ui_HgQueuesListAllGuardsDialog 13 from .Ui_HgQueuesListAllGuardsDialog import Ui_HgQueuesListAllGuardsDialog
36 self.__hgClient = vcs.getClient() 34 self.__hgClient = vcs.getClient()
37 35
38 self.show() 36 self.show()
39 QCoreApplication.processEvents() 37 QCoreApplication.processEvents()
40 38
41 def start(self, path): 39 def start(self):
42 """ 40 """
43 Public slot to start the list command. 41 Public slot to start the list command.
44
45 @param path name of directory to be listed (string)
46 """ 42 """
47 dname, fname = self.vcs.splitPath(path)
48
49 # find the root of the repo
50 repodir = dname
51 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
52 repodir = os.path.dirname(repodir)
53 if os.path.splitdrive(repodir)[1] == os.sep:
54 return
55
56 args = self.vcs.initCommand("qguard") 43 args = self.vcs.initCommand("qguard")
57 args.append("--list") 44 args.append("--list")
58 45
59 output = self.__hgClient.runcommand(args)[0] 46 output = self.__hgClient.runcommand(args)[0]
60 47

eric ide

mercurial