eric6/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListDialog.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 a list of applied and unapplied patches. 7 Module implementing a dialog to show a list of applied and unapplied 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 ( 11 from PyQt5.QtWidgets import (
14 QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem 12 QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem
15 ) 13 )
60 if self.__hgClient.isExecuting(): 58 if self.__hgClient.isExecuting():
61 self.__hgClient.cancel() 59 self.__hgClient.cancel()
62 60
63 e.accept() 61 e.accept()
64 62
65 def start(self, path): 63 def start(self):
66 """ 64 """
67 Public slot to start the list command. 65 Public slot to start the list command.
68
69 @param path name of directory to be listed (string)
70 """ 66 """
71 self.errorGroup.hide() 67 self.errorGroup.hide()
72
73 self.intercept = False
74 self.activateWindow() 68 self.activateWindow()
75 69
76 dname, fname = self.vcs.splitPath(path)
77
78 # find the root of the repo
79 repodir = dname
80 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
81 repodir = os.path.dirname(repodir)
82 if os.path.splitdrive(repodir)[1] == os.sep:
83 return
84
85 self.__repodir = repodir
86 self.__getSeries() 70 self.__getSeries()
87 71
88 def __getSeries(self, missing=False): 72 def __getSeries(self, missing=False):
89 """ 73 """
90 Private slot to get the list of applied, unapplied and guarded patches 74 Private slot to get the list of applied, unapplied and guarded patches

eric ide

mercurial