Matt Harbison <matt_harbison@yahoo.com> [Mon, 02 May 2022 22:04:59 -0400] rev 48848
doc: use an absolute path in sys.path to work around a python DLL loading bug
This bug[1] was causing the zstd entry under "Available Compression Engines" to
be omitted from the documentation for some versions of python3. I could
upgrade, but past upgrades have broken venvs and clobbered installed packages.
It's a trivial workaround, so there's no sense in leaving this subtle issue. It
was flushed out by changing the module policy here from 'allow' to 'c', and
seeing this error:
ImportError: DLL load failed while importing parsers: The parameter is incorrect.
[1] https://github.com/python/cpython/issues/87271
Differential Revision: https://phab.mercurial-scm.org/D12599
Raphaël Gomès <rgomes@octobus.net> [Mon, 25 Apr 2022 16:45:03 +0200] rev 48847
rhg: fix dirstate-v2 data file removal system
In D12581 I introduced logic to remove the previous dirstate-v2 data file
after a new one is created (and its corresponding docket), but the logic was
flawed. I fixed it and made it simpler to understand by gather all logic in
a single expression.
Differential Revision: https://phab.mercurial-scm.org/D12586
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Apr 2022 12:27:40 +0200] rev 48846
rhg: use `Command::exec` instead of `Command::status`
`rhg` is supposed to be a transparent executable, using a subprocess defeats
that purpose. See inline comments for more details.
This also introduces the `which` crate to check if the fallback executable
actually exists to help debugging (plain `execve` doesn't give much
information).
The error code 253 is used to signify that the fallback is not found, but may
mean in the future that it is otherwise invalid if we start being more
specific.
Differential Revision: https://phab.mercurial-scm.org/D12578
Martin von Zweigbergk <martinvonz@google.com> [Wed, 27 Apr 2022 15:47:57 +0200] rev 48845
commit: don't use hard-coded `.hg/last-message.txt` path in error message
Whoever wrote D8463 just used a hard-coded path to
`.hg/last-message.text` instead of using the relative path that was
already available in the `msgfn` variable (and used just a few lines
up in related message). Let's fix that.
Differential Revision: https://phab.mercurial-scm.org/D12585
Raphaël Gomès <rgomes@octobus.net> [Thu, 21 Apr 2022 15:10:57 +0200] rev 48844
rust-dirstate-v2: clean up previous data file after the docket is written
This was overlooked before and caused many data files to keep living forever.
We could potentially consider adding a random cleanup of them in case they
slipped through one day.
Differential Revision: https://phab.mercurial-scm.org/D12581
Raphaël Gomès <rgomes@octobus.net> [Thu, 21 Apr 2022 14:47:13 +0200] rev 48843
rust-dirstate-v2: save proper data size if no new data on append
This is currently only triggered with the tests ran with `--rhg` without
`--rust`, by "luck", there probably always was something to write, like an
mtime when also using Rust extensions alongside `rhg`.
Differential Revision: https://phab.mercurial-scm.org/D12580
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Apr 2022 14:46:22 -0400] rev 48842
procutil: avoid `+= None` when writing to full std{err,out} descriptor on py3
The write function returns `None` if there was no room to write the given
data[1]. I don't like that this is effectively an infinite loop if there's
never any progress emptying the underlying buffer, but we're no worse off than
before, and it fixes random stacktrace popups seen in the py3 build of
TortoiseHg.
[1] https://docs.python.org/3/library/io.html#io.RawIOBase.write
Differential Revision: https://phab.mercurial-scm.org/D12555