Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py

changeset 1256
885706dbb69f
parent 1250
dafdd7d97a9f
child 1260
9488a3aceb0e
equal deleted inserted replaced
1255:e1d8a8a4d40c 1256:885706dbb69f
52 """ 52 """
53 Private slot implementing a close event handler. 53 Private slot implementing a close event handler.
54 54
55 @param e close event (QCloseEvent) 55 @param e close event (QCloseEvent)
56 """ 56 """
57 if self.process is not None and \ 57 if self.__hgClient:
58 self.process.state() != QProcess.NotRunning: 58 if self.__hgClient.isExecuting():
59 self.process.terminate() 59 self.__hgClient.cancel()
60 QTimer.singleShot(2000, self.process.kill) 60 else:
61 self.process.waitForFinished(3000) 61 if self.process is not None and \
62 self.process.state() != QProcess.NotRunning:
63 self.process.terminate()
64 QTimer.singleShot(2000, self.process.kill)
65 self.process.waitForFinished(3000)
62 66
63 e.accept() 67 e.accept()
64 68
65 def start(self, path): 69 def start(self, path):
66 """ 70 """
94 if err: 98 if err:
95 self.__showError(err) 99 self.__showError(err)
96 if out: 100 if out:
97 for line in out.splitlines(): 101 for line in out.splitlines():
98 self.__processOutputLine(line) 102 self.__processOutputLine(line)
103 if self.__hgClient.wasCanceled():
104 break
99 self.__finish() 105 self.__finish()
100 else: 106 else:
101 self.process.kill() 107 self.process.kill()
102 self.process.setWorkingDirectory(repodir) 108 self.process.setWorkingDirectory(repodir)
103 109

eric ide

mercurial