Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Sep 2024 12:38:43 -0400] rev 51860
typing: explicitly set the return type of `_InnerRevLog.raw_text()`
Somewhere between
cd72a88c5599 and
2fd44b3dcc33, pytype changed the return type
from `Tuple[_T1, Any, bool]` to `Any`. Both are wrong. `mdiff.patches()` is an
alias for `mpatch.patches()`, which is selected via module policy (and breaks
the ability to infer the types). However, `cext`, `cffi`, and `pure`
implementations all agree it returns bytes.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Sep 2024 12:28:27 -0400] rev 51859
typing: add explicit hints for recent pytype regressions
Somewhere between
454feddab720 and
cd72a88c5599, pytype changed how it inferred
the return type in `extdiff.py` from
Tuple[Any, List[Tuple[bytes, Any, os.stat_result]]]
to
Tuple[Any, List[nothing]]
It also changed the return type in `archival.py` from `Any` to `NoReturn`. Fix
those up, and also the obvious parameter types while we're here.
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 18:06:50 +0200] rev 51858
revlog: use the method to check if the revlog is being written to
This was probably fine, but it could become not fine at some point.
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 17:26:06 +0200] rev 51857
revlog: add an early return for getting sidedata
No point in trying to fetch sidedata if there isn't a sidedata file.
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 17:19:20 +0200] rev 51856
revlog: simplify rawtext return value
We're always returning a tuple even though only the raw text is being used,
and we're rebuilding another tuple again higher.
As a bonus, this will remove one tuple creation and deletion
per `raw_text` call, hence fewer gc calls, etc.
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 17:06:05 +0200] rev 51855
revlog: cleanup some outdated docstrings
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Sep 2024 10:09:06 +0200] rev 51854
rust-inner-revlog: always inline `get_entry`
This is a very hot function.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Sep 2024 10:08:45 +0200] rev 51853
rust-inner-revlog: derive Debug for IndexHeaderFlags
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Sep 2024 10:08:28 +0200] rev 51852
rust-inner-revlog: drop some outdated comment
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 12:00:55 +0200] rev 51851
rust-config: add more ways of reading the config
These will be needed for future patches of this series to interpret more
complex/different config values.
Raphaël Gomès <rgomes@octobus.net> [Tue, 26 Mar 2024 15:51:31 +0000] rev 51850
util: make buffer readonly
There is no use of writable buffers anywhere in the code, and this helps us
make sure we don't get into unsound territory when sharing memory with Rust.
This `toreadonly` method was not available in Python 3.6, but we dropped the
support for it earlier that week, so no need for any compatibility code.
Matt Harbison <mharbison@atto.com> [Thu, 05 Sep 2024 17:12:52 -0400] rev 51849
setup: avoid the deprecated `distutils.spawn.find_executable`
I noticed this was flagged with `DeprecationWarning` in py3.12 with `setuptools`
74.1.2, and it suggested `shutil.which()` instead. The signatures aren't the
same, but the additional `mode` argument in the middle of the latter defaults to
`os.F_OK | os.X_OK`, which maintains the same semantics.