Raphaël Gomès <rgomes@octobus.net> [Mon, 02 May 2022 17:39:01 +0200] rev 49917
dirstate: add narrow support to `verify`
This will be called later in the series by the `verify` command.
Raphaël Gomès <rgomes@octobus.net> [Mon, 02 May 2022 11:42:23 +0200] rev 49916
dirstate: stop using `entry.state()` for logic in `verify`
Use the new API instead of the deprecated one. The next changeset will remove
the use of `state` in this method altogether (currently still in the messages)
Raphaël Gomès <rgomes@octobus.net> [Mon, 02 May 2022 11:40:33 +0200] rev 49915
dirstate-entry: add `modified` property
This was already done in the Rust implementation and is a useful primitive.
The C implementation had this called `merged`, but wasn't used anywhere.
It will be used in the next changeset.
Franck Bret <franck.bret@octobus.net> [Mon, 19 Dec 2022 16:22:01 +0100] rev 49914
debug: add debug-revlog-stats command
Display statistics about revlogs in the store. Useful to get an approximate
size of a repository, etc. More statistics will be added in the future.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 16 Dec 2022 22:24:05 -0500] rev 49913
typing: attempt to remove @overloads in the platform module for stdlib methods
This is mostly successful, as examining util.pyi, posix.pyi, and windows.pyi
after a pytype run shows that the type overloads for `oslink`, `readlink`,
`removedirs`, `rename`, `split`, and `unlink` have been removed. (Some of these
still have an @overload, but the differences are the variable names, not the
types.) However, @overloads remain for `abspath` and `normpath` for some
reason.
It's useful to redefine these methods for the type checking phase because in
addition to excluding str and PathLike variants, some of these functions have
optional args in stdlib that aren't implemented in the custom implementation on
Windows, and we want the type checking to flag that instead of assuming it's an
allowable overload everywhere.
One last quirk I noticed that I can't explain- `pycompat.TYPE_CHECKING` is
always False, so the conditionals need to check `typing.TYPE_CHECKING` directly.
I tried dropping the custom code for assigning `pycompat.TYPE_CHECKING` and
simply did `from typing import TYPE_CHECKING` directly in pycompat.py, and used
`pycompat.TYPE_CHECKING` for the conditional here... and pytype complained that
`pycompat` doesn't have the `TYPE_CHECKING` variable.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 16 Dec 2022 22:07:02 -0500] rev 49912
typing: add trivial type hints to rest of the windows platform module
Skipping the file wrappers for now because there's interplay with C code, and
making them subclass `typing.BinaryIO_Proxy` confuses PyCharm a bit.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 16 Dec 2022 18:27:15 -0500] rev 49911
typing: add type hints to the rest of the posix module
These methods either don't have an analog in the windows module, or are aliased
in the windows module from something else (like os.path.xxx).
Matt Harbison <matt_harbison@yahoo.com> [Fri, 16 Dec 2022 18:14:54 -0500] rev 49910
typing: add type hints to the platform `cachestat` classes
Matt Harbison <matt_harbison@yahoo.com> [Fri, 16 Dec 2022 14:24:02 -0500] rev 49909
util: fix the signature of observedbufferedinputpipe._fillbuffer()
Flagged by PyCharm, since it didn't match the signature of the method being
overridden. The default value in the superclass is also `_chunksize`, and I
suspect that the amount read from `osread` should be limited to what is passed
in. Only one caller (`bufferedinputpipe.unbufferedread()`) passes this
argument, and it passes the max of `_chunksize` and whatever it was passed.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 16 Dec 2022 14:15:09 -0500] rev 49908
tests: drop some obsolete py2 handling in util.py doctest
Flagged by PyCharm while inspecting imports from the platform modules.