rhg: correctly handle the case where diffs are encoded relative to nullrev
returning a valid entry for nullrev fix chain that delta against nullrev.
test-revlog: test a repository that contains a diff against nullrev
We are witnessing a crash in the rust code, so we lets make sure this case is
tested.
worker: adapt _blockingreader to work around a python3.8.[0-1] bug (
issue6444)
Python 3.8.0 is the latest I can load on Ubuntu 18.04, and I regularly hit the
TypeError because this function is missing. While it can be avoided by
disabling worker usage via config option, that's a bit obscure.
I'm limiting the function definition to the narrow range of affected pythons
because there were other bugs in this area that were worked around, that I don't
fully understand. See the bug report for discussions on why the narrow range,
and related commits working around other bugs.
Differential Revision: https://phab.mercurial-scm.org/D12627
filelog: show the passed argument on error
The error now do more than stating what it need. It also state what it got.
manifest: improve error message in case for tree manifest
In the case where tree manifest is not enabled but we still receive an sub
directory information for the manifest. The error now inform which sub-directory
was passed.
doc: use an absolute path in sys.path
The idea and rationale is similar to https://phab.mercurial-scm.org/D12599
(landed as
1b6e381521c5).
Differential Revision: https://phab.mercurial-scm.org/D12622
check-py3-compat: use an absolute path in sys.path
The idea and rationale is similar to https://phab.mercurial-scm.org/D12599
(landed as
1b6e381521c5).
Differential Revision: https://phab.mercurial-scm.org/D12621
branchmap: use a context manager when writing the branchmap
This is cleaner and safer. The previous code date from long before we had
context manager available.
rhg: align the dirstate v2 writing algorithm with python
Use the same algorithm of file append as python does, where we do a manual
seek instead of relying on O_APPEND. (see the reasons in the inline comment)
test-dirstate: actually test the append code path in dirstate v2
Apparently it's not sufficient to modify a file to force the dirstate
write-out, so the append code path was untested.
By removing a file instead of changing we're forcing append to happen.
auto-upgrade: skip the operation if the repository cannot be locked
This seems like a fine default behavior for now. If some users wants something
more aggressive we can make the behavior configurable in the future.
Differential Revision: https://phab.mercurial-scm.org/D12619
auto-upgrade: add a test case where the repository is already locked
This show the current behavior when the repository to auto-upgrade is already
locked.
The current behavior is to abort, which is probably not great. Now that we have
a proper test, we can think about the behavior we wants in a later tests.
Differential Revision: https://phab.mercurial-scm.org/D12618