Yuya Nishihara <yuya@tcha.org> [Sat, 21 Sep 2019 17:15:50 +0900] rev 43286
rust-cpython: require GIL to borrow immutable reference from PySharedRefCell
Since the inner value may be leaked, we probably need GIL to guarantee that
there's no data race.
inner(py).borrow() is replaced with inner_shared(py).borrow(), which basically
means any PySharedRefCell data should be accessed through PySharedRef wrapper.
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Sep 2019 22:19:10 +0900] rev 43285
rust-cpython: make PyLeakedRef operations relatively safe
This patch encapsulates the access to the leaked reference to make most
leaked-ref operations safe. The only exception is leaked_ref.map(). I
couldn't figure out how to allow arbitrary map operation safely over an
unsafe static reference. See the docstring and inline comment for details.
Now leak_immutable() can be safely implemented as the PyLeakedRef owns
its inner data.
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Sep 2019 22:06:19 +0900] rev 43284
rust-cpython: put leaked reference in PyLeakedRef
The next patch will make PyLeakedRef manage the lifetime of the underlying
object. leak_handle.data.take() will be removed soon.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 17 Oct 2019 20:40:12 -0700] rev 43283
run-tests: make code coverage work on Python 3
This code path was obviously not tested on Python 3 because it
blew up in several places due to str/bytes mismatch.
For internal code, we normalize paths to bytes.
For code calling into `coverage`, we normalize paths to str,
which is what `coverage` seems to expect.
After this, `run-tests.py -H` works on Python 3!
Differential Revision: https://phab.mercurial-scm.org/D7133
Ian Moody <moz-ian@perix.co.uk> [Thu, 17 Oct 2019 22:40:24 +0100] rev 43282
py3: don't index into bytes in phabricator's _tokenize()
`phabread`ing a stack using `hg phabread :D1234` under py3 will currently die
with a KeyError because it will index into `b':D1234'` and return `58` instead
of `b':'` as a token.
Differential Revision: https://phab.mercurial-scm.org/D7129
Raphaël Gomès <rgomes@octobus.net> [Thu, 17 Oct 2019 14:20:11 +0200] rev 43281
rust-dirstate-status: use fast-path even with fsmonitor and sparse extensions
When I initially ran the tests on my series, there were test failures related
to those extensions. Now that the initial series has landed, I felt like going
back to those issues because people with performance issues will often want to
use fsmonitor and sparse.
Either because of flaky tests or because the series has changed so much, I
can't seem to reproduce these issues... let's widen the scope of the fast-path.
Differential Revision: https://phab.mercurial-scm.org/D7128
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2019 10:14:26 +0200] rev 43280
rust-dirstatemap: remove additional lookups in dirstatemap
We're copying this shortcut from the Python implementation, pretty standard
for this codebase.
Differential Revision: https://phab.mercurial-scm.org/D7117
Denis Laxalde <denis@laxalde.org> [Thu, 17 Oct 2019 21:37:21 +0200] rev 43279
tests: avoid chmod on windows in hgrc tests
Follow up on changeset
d201a637c971 introducing this test, which fails
on Windows.