Mercurial > hg
view tests/test-debug-rebuild-dirstate.t @ 51685:0eb515c7bec8
typing: add trivial type hints to the convert extension's common modules
This started as ensuring that the `encoding` and `orig_encoding` attributes has
a type other than `Any`, so pytype can catch problems where it needs to be str
for stdlib encoding and decoding. It turns out that adding the hint in
`mercurial.encoding` is what was needed, but I picked a bunch of low hanging
fruit while here. There's definitely more to do, and I see a problem where
`shlex.shlex` is being fed bytes instead of str, but there are not enough type
hints yet to make pytype notice.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 11 Jul 2024 20:54:06 -0400 |
parents | dcaa2df1f688 |
children |
line wrap: on
line source
#require rust $ cat >> $HGRCPATH << EOF > [format] > use-dirstate-v2=1 > [storage] > dirstate-v2.slow-path=allow > EOF $ hg init t $ cd t $ for i in 1 2 3 4 5 6 7 8 9 10; do touch foobar$i; done $ hg add . adding foobar1 adding foobar10 adding foobar2 adding foobar3 adding foobar4 adding foobar5 adding foobar6 adding foobar7 adding foobar8 adding foobar9 $ hg commit -m "1" Check that there's no space leak on debugrebuilddirstate $ f --size .hg/dirstate* .hg/dirstate: size=133 .hg/dirstate.88698448: size=511 $ hg debugrebuilddirstate $ f --size .hg/dirstate* .hg/dirstate: size=133 .hg/dirstate.6b8ab34b: size=511 $ hg debugrebuilddirstate $ f --size .hg/dirstate* .hg/dirstate: size=133 .hg/dirstate.b875dfc5: size=511