worker: check problem state correctly (issue3982)
authorMatt Mackall <mpm@selenic.com>
Tue, 16 Jul 2013 11:53:53 -0500
changeset 19406 3185b347ae98
parent 19405 447332970d7b
child 19407 ce3d1cf957f8
worker: check problem state correctly (issue3982) If a large update triggered an abort, it was possible for the main thread to still update the dirstate. This fix is incomplete, as the failing worker now doesn't generate a proper error message. This is difficult in the fork-based framework, which relies on exceptions propagating to the top of the dispatcher for formatting.
mercurial/worker.py
--- a/mercurial/worker.py	Tue Jul 16 11:18:16 2013 -0500
+++ b/mercurial/worker.py	Tue Jul 16 11:53:53 2013 -0500
@@ -109,7 +109,7 @@
     def waitforworkers():
         for _ in pids:
             st = _exitstatus(os.wait()[1])
-            if st and not problem:
+            if st and not problem[0]:
                 problem[0] = st
                 killworkers()
     t = threading.Thread(target=waitforworkers)