Wed, 15 Dec 2021 15:28:30 +0100 revlog: add some information about the revision we cannot find
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Dec 2021 15:28:30 +0100] rev 48496
revlog: add some information about the revision we cannot find Parameter to Exception are good, use them. Differential Revision: https://phab.mercurial-scm.org/D11933
Thu, 16 Dec 2021 17:34:51 +0100 rhg: Use binary search in manifest lookup
Simon Sapin <simon.sapin@octobus.net> [Thu, 16 Dec 2021 17:34:51 +0100] rev 48495
rhg: Use binary search in manifest lookup … instead of linear scan, when looking for a single entry based on its path. Manifest entries are sorted by path, but are variable-size so we can’t use the standard library’s `[T]::binary_search`. We can still jump to a byte index and then look around for entry boundaries. Differential Revision: https://phab.mercurial-scm.org/D11932
Mon, 29 Nov 2021 12:27:33 +0000 sparse: lock the store when updating requirements config stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 29 Nov 2021 12:27:33 +0000] rev 48494
sparse: lock the store when updating requirements config Differential Revision: https://phab.mercurial-scm.org/D11817
Tue, 16 Nov 2021 17:35:57 +0000 sparse: demonstrate a bug when used with safe-share stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 16 Nov 2021 17:35:57 +0000] rev 48493
sparse: demonstrate a bug when used with safe-share sparse: lock the store when updating requirements config Differential Revision: https://phab.mercurial-scm.org/D11766
Fri, 17 Dec 2021 11:46:30 +0100 rust: Upgrade to format-bytes 0.3
Simon Sapin <simon.sapin@octobus.net> [Fri, 17 Dec 2021 11:46:30 +0100] rev 48492
rust: Upgrade to format-bytes 0.3 This removes use of the proc-macro-hack crate, which is possible now that we don’t support Rust 1.41 to 1.44 anymore. This in turn fixes spurious errors reported by rust-analyser: https://github.com/rust-analyzer/rust-analyzer/issues/9606#issuecomment-919240134 Differential Revision: https://phab.mercurial-scm.org/D11938
Tue, 14 Dec 2021 20:13:10 -0500 pytype: stop excluding ssutil.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 20:13:10 -0500] rev 48491
pytype: stop excluding ssutil.py Pytype simply can't distinguish the type for this one entry's value from the other values: File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line 142, in _hostsettings: No attribute 'append' on None [attribute-error] In Optional[Union[Any, List[nothing], bool, bytes]] File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line 142, in _hostsettings: No attribute 'append' on bool [attribute-error] In Optional[Union[Any, List[nothing], bool, bytes]] File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line 142, in _hostsettings: No attribute 'append' on bytes [attribute-error] In Optional[Union[Any, List[nothing], bool, bytes]] File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line 147, in _hostsettings: No attribute 'append' on None [attribute-error] In Optional[Union[Any, List[Tuple[Any, Any]], bool, bytes]] File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line 147, in _hostsettings: No attribute 'append' on bool [attribute-error] In Optional[Union[Any, List[Tuple[Any, Any]], bool, bytes]] File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line 147, in _hostsettings: No attribute 'append' on bytes [attribute-error] In Optional[Union[Any, List[Tuple[Any, Any]], bool, bytes]] Differential Revision: https://phab.mercurial-scm.org/D11931
Tue, 14 Dec 2021 19:13:30 -0500 pytype: stop excluding wireprotoserver.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 19:13:30 -0500] rev 48490
pytype: stop excluding wireprotoserver.py The `config` entry is a 2 part tuple, which has `__iter__()`: File "/mnt/c/Users/Matt/hg/mercurial/wireprotoserver.py", line 253, in _availableapis: No attribute '__iter__' on Callable[[Any, Any], Any] [attribute-error] In Union[Callable[[Any, Any, Any, Any, Any], None], Callable[[Any, Any], Any]] File "/mnt/c/Users/Matt/hg/mercurial/wireprotoserver.py", line 253, in _availableapis: No attribute '__iter__' on Callable[[Any, Any, Any, Any, Any], None] [attribute-error] In Union[Callable[[Any, Any, Any, Any, Any], None], Callable[[Any, Any], Any]] Differential Revision: https://phab.mercurial-scm.org/D11930
Tue, 14 Dec 2021 18:36:07 -0500 pytype: stop excluding pycompat.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 18:36:07 -0500] rev 48489
pytype: stop excluding pycompat.py Whatever issues were here seem to have been previously fixed. Differential Revision: https://phab.mercurial-scm.org/D11929
Tue, 14 Dec 2021 17:29:30 -0500 procutil: avoid an uninitialized variable usage on tempfile exception
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 17:29:30 -0500] rev 48488
procutil: avoid an uninitialized variable usage on tempfile exception If `pycompat.unnamedtempfile()` raises an exception, it would have called `stdin.close()` in the `finally` block without it being initialized first. Differential Revision: https://phab.mercurial-scm.org/D11928
Tue, 14 Dec 2021 17:25:46 -0500 pytype: stop excluding procutil.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 17:25:46 -0500] rev 48487
pytype: stop excluding procutil.py This avoids these false warnings: File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 78, in <module>: No attribute 'register' on Type[io.BufferedIOBase] [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 117, in <module>: No attribute 'register' on Type[io.IOBase] [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 770, in runbgcommandpy3: No attribute 'close' on int [attribute-error] In Union[IO[Union[bytes, str]], int] Differential Revision: https://phab.mercurial-scm.org/D11927
Tue, 14 Dec 2021 17:06:32 -0500 pytype: stop excluding chgserver.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 17:06:32 -0500] rev 48486
pytype: stop excluding chgserver.py This teaches pytype about some lazy initialization, and avoids the following: File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 666, in _checkextensions: No attribute '_hashstate' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 672, in _checkextensions: No attribute '_hashstate' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 677, in _bind: No attribute '_realaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 683, in _bind: No attribute '_realaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 686, in _createsymlink: No attribute '_baseaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 686, in _createsymlink: No attribute '_realaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 688, in _createsymlink: No attribute '_baseaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 689, in _createsymlink: No attribute '_realaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 690, in _createsymlink: No attribute '_baseaddress' on chgunixservicehandler [attribute-error] Differential Revision: https://phab.mercurial-scm.org/D11926
Mon, 13 Dec 2021 22:46:43 -0500 pytype: stop excluding webcommands.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 22:46:43 -0500] rev 48485
pytype: stop excluding webcommands.py I have no idea why, but asserting that each value added to `emptydirs` is not None didn't fix this: File "/mnt/c/Users/Matt/hg/mercurial/hgweb/webcommands.py", line 621, in dirlist: Function bytes.join was called with the wrong arguments [wrong-arg-types] Expected: (self, iterable: Iterable[bytes]) Actually passed: (self, iterable: List[None]) Differential Revision: https://phab.mercurial-scm.org/D11924
Mon, 13 Dec 2021 20:45:31 -0500 tests: drop an obsolete comment about a pytype failure
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 20:45:31 -0500] rev 48484
tests: drop an obsolete comment about a pytype failure Differential Revision: https://phab.mercurial-scm.org/D11923
Mon, 13 Dec 2021 20:19:09 -0500 pytype: stop excluding patch.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 20:19:09 -0500] rev 48483
pytype: stop excluding patch.py The underlying `email.generator.BytesGenerator` is documented as requiring an `fp` that accepts bytes, so I'm not sure why pytype is getting confused: File "/mnt/c/Users/Matt/hg/mercurial/patch.py", line 112, in msgfp: Function Generator.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, outfp: TextIO, ...) Actually passed: (self, outfp: io.BytesIO, ...) Differential Revision: https://phab.mercurial-scm.org/D11922
Mon, 13 Dec 2021 19:34:06 -0500 pytype: stop excluding statprof.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 19:34:06 -0500] rev 48482
pytype: stop excluding statprof.py This seems to have worked fine before (at least on Linux). We could just add suppression comments, but this file already imports from the mercurial package, which seems to prevent this from running as a standalone program because of the relative import of `pycompat`. PyCharm isn't happy either way. File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 501, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 1091, in main File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 501, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 431, in profile File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 522, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 1091, in main File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 522, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 431, in profile File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 523, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 1091, in main File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 523, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 431, in profile File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 524, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 1091, in main File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 524, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 431, in profile File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 796, in _write: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Differential Revision: https://phab.mercurial-scm.org/D11921
Mon, 13 Dec 2021 17:59:36 -0500 statprof: convert a few exception byte strings to str
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 17:59:36 -0500] rev 48481
statprof: convert a few exception byte strings to str That way these display without the b'' prefix. Differential Revision: https://phab.mercurial-scm.org/D11920
Mon, 13 Dec 2021 16:42:36 -0500 pytype: stop excluding wireprotov2server.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 16:42:36 -0500] rev 48480
pytype: stop excluding wireprotov2server.py This fixes: File "/mnt/c/Users/Matt/hg/mercurial/wireprotov2server.py", line 584, in _capabilitiesv2: unsupported operand type(s) for item assignment: Set[bytes] [unsupported-operands] No attribute '__setitem__' on Set[bytes] File "/mnt/c/Users/Matt/hg/mercurial/wireprotov2server.py", line 611, in _capabilitiesv2: No attribute 'append' on dict [attribute-error] In Union[List[bytes], List[nothing], dict] Called from (traceback): line 543, in httpv2apidescriptor Differential Revision: https://phab.mercurial-scm.org/D11919
Mon, 13 Dec 2021 14:43:10 -0500 pytype: stop excluding stringutil.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 14:43:10 -0500] rev 48479
pytype: stop excluding stringutil.py This fixes the following: File "/mnt/c/Users/Matt/hg/mercurial/utils/stringutil.py", line 267, in prettyrepr: Function bytes.startswith expects 2 arg(s), got 3 [wrong-arg-count] Expected: (self, prefix) Actually passed: (self, prefix, _) File "/mnt/c/Users/Matt/hg/mercurial/utils/stringutil.py", line 695, in escapestr: No attribute 'escape_encode' on module 'codecs' [module-attr] File "/mnt/c/Users/Matt/hg/mercurial/utils/stringutil.py", line 699, in unescapestr: No attribute 'escape_decode' on module 'codecs' [module-attr] Differential Revision: https://phab.mercurial-scm.org/D11918
Mon, 13 Dec 2021 00:25:38 -0500 pytype: stop excluding cmdutil.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 00:25:38 -0500] rev 48478
pytype: stop excluding cmdutil.py Whatever was broken here seems to have been previously fixed. Differential Revision: https://phab.mercurial-scm.org/D11917
Mon, 13 Dec 2021 00:04:53 -0500 pytype: stop excluding copies.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 00:04:53 -0500] rev 48477
pytype: stop excluding copies.py I can't prove that `targetrev` is always in `all_copies`, but it would have been a runtime error before too if it's not. Differential Revision: https://phab.mercurial-scm.org/D11916
Sun, 12 Dec 2021 22:29:46 -0500 copies: fix some documentation typos
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Dec 2021 22:29:46 -0500] rev 48476
copies: fix some documentation typos Differential Revision: https://phab.mercurial-scm.org/D11915
Sun, 12 Dec 2021 22:24:16 -0500 copies: drop an unused variable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Dec 2021 22:24:16 -0500] rev 48475
copies: drop an unused variable Differential Revision: https://phab.mercurial-scm.org/D11914
Sun, 12 Dec 2021 22:09:13 -0500 pytype: stop excluding lsprof.py
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Dec 2021 22:09:13 -0500] rev 48474
pytype: stop excluding lsprof.py Whatever was previously flagged in this file appears to have been fixed. Differential Revision: https://phab.mercurial-scm.org/D11913
Sun, 12 Dec 2021 21:10:02 -0500 pytype: stop excluding changegroup.py
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Dec 2021 21:10:02 -0500] rev 48473
pytype: stop excluding changegroup.py The false positives that were detected seem to be related to what happens to the variables after the local methods are used: File "/mnt/c/Users/Matt/hg/mercurial/changegroup.py", line 353, in ondupchangelog: No attribute 'append' on range [attribute-error] In Union[List[nothing], range] File "/mnt/c/Users/Matt/hg/mercurial/changegroup.py", line 357, in onchangelog: No attribute 'update' on None [attribute-error] Differential Revision: https://phab.mercurial-scm.org/D11912
Sun, 12 Dec 2021 20:01:05 -0500 pytype: stop excluding upgrade.py
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Dec 2021 20:01:05 -0500] rev 48472
pytype: stop excluding upgrade.py The sole failure here was this, which is fixed by simply creating a set like the caller, instead of a dict: File "/mnt/c/Users/Matt/hg/mercurial/upgrade.py", line 73, in upgraderepo: No attribute 'discard' on Dict[nothing, nothing] [attribute-error] In Union[Any, Dict[nothing, nothing]] Differential Revision: https://phab.mercurial-scm.org/D11911
Tue, 14 Dec 2021 20:36:36 +0100 rhg: Skip reading the contents of ambiguous files in some cases
Simon Sapin <simon.sapin@octobus.net> [Tue, 14 Dec 2021 20:36:36 +0100] rev 48471
rhg: Skip reading the contents of ambiguous files in some cases If the size of the file in the working directory does not match the length of the filelog data, we know its contents will be different and don’t need to read it. rhg still decodes the filelog revision, which is not needed in some cases. Differential Revision: https://phab.mercurial-scm.org/D11910
Tue, 14 Dec 2021 19:47:33 +0100 rhg: Mark it as expected that the issue6528 bug is not reproduced
Simon Sapin <simon.sapin@octobus.net> [Tue, 14 Dec 2021 19:47:33 +0100] rev 48470
rhg: Mark it as expected that the issue6528 bug is not reproduced Differential Revision: https://phab.mercurial-scm.org/D11909
Tue, 14 Dec 2021 13:41:34 -0800 filemerge: remove leftover documentation of removed argument
Martin von Zweigbergk <martinvonz@google.com> [Tue, 14 Dec 2021 13:41:34 -0800] rev 48469
filemerge: remove leftover documentation of removed argument I removed the `premerge` argument in https://phab.mercurial-scm.org/D11859. Differential Revision: https://phab.mercurial-scm.org/D11925
Mon, 13 Dec 2021 14:44:16 -0500 merge with stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 14:44:16 -0500] rev 48468
merge with stable
Mon, 13 Dec 2021 14:37:16 +0100 rhg: Print "bad match" errors in rhg status
Simon Sapin <simon.sapin@octobus.net> [Mon, 13 Dec 2021 14:37:16 +0100] rev 48467
rhg: Print "bad match" errors in rhg status Previously these would only be visible if enabled with some RUST_LOG environment variable. Differential Revision: https://phab.mercurial-scm.org/D11908
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 tip