Wed, 19 Jun 2024 12:49:26 +0200 rust: use new revlog configs in all revlog opening code
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 12:49:26 +0200] rev 51867
rust: use new revlog configs in all revlog opening code This centralizes the more complex logic needed for the upcoming code and creates stronger APIs with fewer booleans. We also reuse `RevlogType` where needed.
Tue, 17 Sep 2024 10:18:32 +0200 rust-revlog: don't try to open the data file if the index is empty
Raphaël Gomès <rgomes@octobus.net> [Tue, 17 Sep 2024 10:18:32 +0200] rev 51866
rust-revlog: don't try to open the data file if the index is empty This will cover the case where the data file is not present.
Wed, 19 Jun 2024 12:25:12 +0200 rust-revlog: add revlog-specific config objects
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Jun 2024 12:25:12 +0200] rev 51865
rust-revlog: add revlog-specific config objects These will be used by the upcoming Rust `InnerRevlog` to better centralize config information that is relevant to revlogs.
Thu, 12 Sep 2024 16:27:58 -0400 typing: add `from __future__ import annotations` to remaining source files
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Sep 2024 16:27:58 -0400] rev 51864
typing: add `from __future__ import annotations` to remaining source files Most of these look newer than when the original imports referenced in the previous commit were dropped, so these weren't covered by the backout. These were found with: hg files mercurial hgext hgext3rd -I '**.py' -X '**/thirdparty' \ | xargs grep -L 'from __future__ import annotations' All of the `__init__.py` files that finds are empty, so those were ignored and the rest manually edited.
Mon, 16 Sep 2024 15:36:44 +0200 typing: add `from __future__ import annotations` to most files
Matt Harbison <matt_harbison@yahoo.com> [Mon, 16 Sep 2024 15:36:44 +0200] rev 51863
typing: add `from __future__ import annotations` to most files Now that py36 is no longer supported, we can postpone annotation evaluation. This means that the quoting is usually optional (for things imported under the guard of `if typing.TYPE_CHECKING:` to avoid circular imports), and there's less overhead on startup[1]. There may be some missing here. I backed out 6000f5b25c9b (which removed the `from __future__ import ...` that was supporting py2), reverted the changes in `contrib/`, `doc/`, and `tests/`, and then ran: $ hg status -n --change . | \ xargs sed -i -e 's/from __future__ import .*$/from __future__ import annotations/' There were some minor tweaks needed when reviewing (mostly making the spacing around the import consistent, and `mercurial/testing/__init__.py` had a multiline import that wasn't fully rewritten. [1] https://docs.python.org/3/whatsnew/3.7.html#pep-563-postponed-evaluation-of-annotations
Mon, 16 Sep 2024 15:36:38 +0200 format: add many "missing" comma
Matt Harbison <matt_harbison@yahoo.com> [Mon, 16 Sep 2024 15:36:38 +0200] rev 51862
format: add many "missing" comma Black was not adding them until the next changeset introduced a bunch of `from __future__ import annotations` to most file. Since it make the next changeset hard to read we introduce them in advance.
Thu, 12 Sep 2024 12:53:00 -0400 typing: simplify archive.gz writing and drop a few pytype suppressions
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Sep 2024 12:53:00 -0400] rev 51861
typing: simplify archive.gz writing and drop a few pytype suppressions I was waiting until 3.8 to use `Literal` to fix this, but there's also the ":" and "|" characters that are passed along here, meant only for the non-gz archive types. But manipulating what the local caller passes is silly- we know we're writing, so just open it for writing. As an added bonus, PyCharm stops flagging the call too (since it doesn't know about pytype suppression comments).
Thu, 12 Sep 2024 12:38:43 -0400 typing: explicitly set the return type of `_InnerRevLog.raw_text()`
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.
Thu, 12 Sep 2024 12:28:27 -0400 typing: add explicit hints for recent pytype regressions
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.
Wed, 19 Jun 2024 18:06:50 +0200 revlog: use the method to check if the revlog is being written to
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.
(0) -30000 -10000 -3000 -1000 -300 -100 -10 tip