Hi,
This is bugfix patch, but intended for default branch. The problem won't
happen in stable release.
https://bitbucket.org/tortoisehg/thg/issue/2611/
# HG changeset patch
# User Yuya Nishihara <
yu...@tcha.org>
# Date 1369148397 -32400
# Tue May 21 23:59:57 2013 +0900
# Node ID 325ef91d6b47c9eee9c5a1bc9fd4c6842f072fff
# Parent 96275cf8d36474942e299868eefa16deb3bda243
cmdui: keep running state just before emitting commandFinished (fixes #2611)
MergeDialog checks cmd.running() on repositoryChanged. But thread.isRunning()
is cleared slightly earlier than finished slot. Thus, the dialog may exit
before clean-up.
diff --git a/tortoisehg/hgqt/cmdui.py b/tortoisehg/hgqt/cmdui.py
--- a/tortoisehg/hgqt/cmdui.py
+++ b/tortoisehg/hgqt/cmdui.py
@@ -228,7 +228,10 @@ class Core(QObject):
if self.extproc:
return self.extproc.state() != QProcess.NotRunning
elif self.thread:
- return self.thread.isRunning()
+ # keep "running" until just before emitting commandFinished.
+ # thread.isRunning() is cleared earlier than onThreadFinished,
+ # because inter-thread signal is queued.
+ return True
except AttributeError:
pass
return False