worker: stop relying on garbage collection to release memoryview
On CPython, before resizing the bytearray, all memoryviews referencing it must
be released. Before this change, we ensured that all references to them were
deleted. On CPython, this was enough to set the reference count to zero, which
results in garbage collecting and releasing them.
On PyPy, releasing the memoryviews is not necessary because they are implemented
differently. If it would be necessary however, ensuring that all references are
deleted would not be suffient because PyPy doesn’t use reference counting.
By using with statements that take care of releasing the memoryviews, we ensure
that the bytearray is resizable without relying on implementation details. So
while this doesn’t fix any observable bug, it increases compatiblity with other
and future Python implementations.
== New Features ==
* The amend extension supports the `--currentuser` argument.
* The amend extension supports the `--close-branch` argument.
* The amend extension supports the `--secret` argument.
* The uncommit extension supports the `rewrite.update-timestamp` config option.
== New Experimental Features ==
== Bug Fixes ==
== Backwards Compatibility Changes ==
* A shell that supports `$(command)`` syntax for command substitution is now
required for running the test suite. The test runner normally uses
`sh`, so if that is a shell that doesn't support `$(command)` syntax,
you can override it by setting `$HGTEST_SHELL` or by passing it to
`run-tests.py --shell <shell>`.
* The (experimental) narrow extension's wire protocol changed. If
you're using it, you'll need to make sure to upgrade server and
client at the same time.
== Internal API Changes ==