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

changeset 7370
5fb53279f2df
parent 7360
9190402e4505
child 7923
91e843545d9a
equal deleted inserted replaced
7369:dbeeed55df08 7370:5fb53279f2df
5 5
6 """ 6 """
7 Module implementing a dialog used by the queue management functions. 7 Module implementing a dialog used by the queue management functions.
8 """ 8 """
9 9
10 10 from PyQt5.QtCore import pyqtSlot, Qt, QCoreApplication
11 from PyQt5.QtCore import pyqtSlot, Qt, QProcess, QCoreApplication
12 from PyQt5.QtWidgets import ( 11 from PyQt5.QtWidgets import (
13 QDialog, QDialogButtonBox, QAbstractItemView, QListWidgetItem, 12 QDialog, QDialogButtonBox, QAbstractItemView, QListWidgetItem,
14 QAbstractButton 13 QAbstractButton
15 ) 14 )
16 15
97 activeQueue = "" 96 activeQueue = ""
98 97
99 args = self.vcs.initCommand("qqueue") 98 args = self.vcs.initCommand("qqueue")
100 args.append("--list") 99 args.append("--list")
101 100
102 output = "" 101 output = self.__hgClient.runcommand(args)[0]
103 if self.__hgClient:
104 output = self.__hgClient.runcommand(args)[0]
105 else:
106 process = QProcess()
107 process.setWorkingDirectory(self.__repodir)
108 process.start('hg', args)
109 procStarted = process.waitForStarted(5000)
110 if procStarted:
111 finished = process.waitForFinished(30000)
112 if finished and process.exitCode() == 0:
113 output = str(process.readAllStandardOutput(),
114 self.vcs.getEncoding(), 'replace')
115 102
116 for queue in output.splitlines(): 103 for queue in output.splitlines():
117 queue = queue.strip() 104 queue = queue.strip()
118 if queue.endswith(")"): 105 if queue.endswith(")"):
119 queue = queue.rsplit(None, 1)[0] 106 queue = queue.rsplit(None, 1)[0]

eric ide

mercurial