fix: disable use of thread-based worker stable
authorYuya Nishihara <yuya@tcha.org>
Wed, 31 Oct 2018 21:16:54 +0900
branchstable
changeset 40431 8ebb05f747e5
parent 40429 14b6afc6cb28
child 40444 256b1f0c24e8
fix: disable use of thread-based worker getfixes() accesses to repo, changectx, filectx, etc., so I believe there are code paths triggering data race. Mercurial API isn't thread safe in general.
hgext/fix.py
--- a/hgext/fix.py	Wed Oct 31 15:27:06 2018 +0300
+++ b/hgext/fix.py	Wed Oct 31 21:16:54 2018 +0900
@@ -157,7 +157,8 @@
                 # Don't waste memory/time passing unchanged content back, but
                 # produce one result per item either way.
                 yield (rev, path, newdata if newdata != olddata else None)
-        results = worker.worker(ui, 1.0, getfixes, tuple(), workqueue)
+        results = worker.worker(ui, 1.0, getfixes, tuple(), workqueue,
+                                threadsafe=False)
 
         # We have to hold on to the data for each successor revision in memory
         # until all its parents are committed. We ensure this by committing and