[PATCH STABLE] fix: disable use of thread-based worker
Yuya Nishihara
yuya at tcha.org
Wed Oct 31 12:34:09 UTC 2018
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1540988214 -32400
# Wed Oct 31 21:16:54 2018 +0900
# Branch stable
# Node ID 7dfbc7af72cb0c36717daee3313161a1edd79aa5
# Parent bafa1c4bb7a8d397f62e0cd75b8064ef1375b753
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.
diff --git a/hgext/fix.py b/hgext/fix.py
--- a/hgext/fix.py
+++ b/hgext/fix.py
@@ -157,7 +157,8 @@ def fix(ui, repo, *pats, **opts):
# 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
More information about the Mercurial-devel
mailing list