diff -r dbeeed55df08 -r 5fb53279f2df eric6/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListGuardsDialog.py --- a/eric6/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListGuardsDialog.py Wed Jan 08 19:13:57 2020 +0100 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListGuardsDialog.py Mon Jan 13 19:23:08 2020 +0100 @@ -7,10 +7,9 @@ Module implementing a dialog to show the guards of a selected patch. """ - import os -from PyQt5.QtCore import pyqtSlot, Qt, QProcess, QTimer, QCoreApplication +from PyQt5.QtCore import pyqtSlot, Qt, QCoreApplication from PyQt5.QtWidgets import QDialog, QListWidgetItem from .Ui_HgQueuesListGuardsDialog import Ui_HgQueuesListGuardsDialog @@ -34,7 +33,6 @@ self.setupUi(self) self.setWindowFlags(Qt.Window) - self.process = QProcess() self.vcs = vcs self.__hgClient = vcs.getClient() @@ -49,17 +47,8 @@ @param e close event (QCloseEvent) """ - if self.__hgClient: - if self.__hgClient.isExecuting(): - self.__hgClient.cancel() - else: - if ( - self.process is not None and - self.process.state() != QProcess.NotRunning - ): - self.process.terminate() - QTimer.singleShot(2000, self.process.kill) - self.process.waitForFinished(3000) + if self.__hgClient.isExecuting(): + self.__hgClient.cancel() e.accept() @@ -95,19 +84,7 @@ if patch: args.append(patch) - output = "" - if self.__hgClient: - output = self.__hgClient.runcommand(args)[0].strip() - else: - process = QProcess() - process.setWorkingDirectory(self.__repodir) - process.start('hg', args) - procStarted = process.waitForStarted(5000) - if procStarted: - finished = process.waitForFinished(30000) - if finished and process.exitCode() == 0: - output = str(process.readAllStandardOutput(), - self.vcs.getEncoding(), 'replace').strip() + output = self.__hgClient.runcommand(args)[0].strip() if output: patchName, guards = output.split(":", 1)