Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksInOutDialog.py

changeset 1256
885706dbb69f
parent 1251
d40491ba96ce
child 1260
9488a3aceb0e
equal deleted inserted replaced
1255:e1d8a8a4d40c 1256:885706dbb69f
65 """ 65 """
66 Private slot implementing a close event handler. 66 Private slot implementing a close event handler.
67 67
68 @param e close event (QCloseEvent) 68 @param e close event (QCloseEvent)
69 """ 69 """
70 if self.process is not None and \ 70 if self.__hgClient:
71 self.process.state() != QProcess.NotRunning: 71 if self.__hgClient.isExecuting():
72 self.process.terminate() 72 self.__hgClient.cancel()
73 QTimer.singleShot(2000, self.process.kill) 73 else:
74 self.process.waitForFinished(3000) 74 if self.process is not None and \
75 self.process.state() != QProcess.NotRunning:
76 self.process.terminate()
77 QTimer.singleShot(2000, self.process.kill)
78 self.process.waitForFinished(3000)
75 79
76 e.accept() 80 e.accept()
77 81
78 def start(self, path): 82 def start(self, path):
79 """ 83 """
112 if err: 116 if err:
113 self.__showError(err) 117 self.__showError(err)
114 if out: 118 if out:
115 for line in out.splitlines(): 119 for line in out.splitlines():
116 self.__processOutputLine(line) 120 self.__processOutputLine(line)
121 if self.__hgClient.wasCanceled():
122 break
117 self.__finish() 123 self.__finish()
118 else: 124 else:
119 self.process.kill() 125 self.process.kill()
120 self.process.setWorkingDirectory(repodir) 126 self.process.setWorkingDirectory(repodir)
121 127

eric ide

mercurial