Fri, 06 Jan 2023 15:17:14 +0000 worker: avoid reading 1 byte at a time from the OS pipe
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 06 Jan 2023 15:17:14 +0000] rev 49899
worker: avoid reading 1 byte at a time from the OS pipe Apparently `pickle.load` does a lot of small reads, many of them literally 1-byte, so it benefits greatly from buffering. This change enables the buffering, at the cost of more complicated interaction with the `selector` API. On one repository with ~400k files this reduces the time by about ~30s, from ~60 to ~30s. The difference is so large because the actual updating work is parallellized, while these small reads are bottlenecking the central hg process.
Tue, 10 Jan 2023 12:55:49 -0500 diffutil: rewrite an ersatz ternary operator for building diffopts.text
Matt Harbison <matt_harbison@yahoo.com> [Tue, 10 Jan 2023 12:55:49 -0500] rev 49898
diffutil: rewrite an ersatz ternary operator for building diffopts.text Pytype tends to get confused by these, but the real problem here is that if the caller passes `opts={}` as TortoiseHg has been doing, that is set as the value for `diffopts.text` when in reality it expects a boolean. When `None` is passed explicitly, the default value in `mdiff.defaultopts` is assigned.
Mon, 09 Jan 2023 14:34:19 -0500 mdiff: add a __str__ method to diffopts
Matt Harbison <matt_harbison@yahoo.com> [Mon, 09 Jan 2023 14:34:19 -0500] rev 49897
mdiff: add a __str__ method to diffopts This makes it easier to debug by just formatting the object into `%s` to see the members and state, instead of the class and memory address.
Fri, 06 Jan 2023 11:38:13 -0500 debugshell: allow TortoiseHg builds to exit with the usual `quit()` command
Matt Harbison <matt_harbison@yahoo.com> [Fri, 06 Jan 2023 11:38:13 -0500] rev 49896
debugshell: allow TortoiseHg builds to exit with the usual `quit()` command I've long been annoyed that `quit()` only randomly worked to exit the interpreter. When that happens, Ctrl+C doesn't work either (it simply prints "KeyboardInterrupt"), so then you have to `import sys` and `sys.exit()`. But it turns out that the behavior isn't random and it depended on which `hg.exe` was picked up on PATH first, because py2exe disables site initialization. I wasn't able to persuade the maintainer to allow an opt-in to initialization[1], but this works around it so that the behavior is now consistent however `hg.exe` is built. TortoiseHg 6.3.3 will be the first build that includes the site package, so handle the ImportError. [1] https://github.com/py2exe/py2exe/issues/154
Wed, 11 Jan 2023 19:53:58 +0000 doc: add a few comments
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 11 Jan 2023 19:53:58 +0000] rev 49895
doc: add a few comments
Thu, 05 Jan 2023 17:15:03 +0000 rhg: implement checkexec to support weird filesystems
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 05 Jan 2023 17:15:03 +0000] rev 49894
rhg: implement checkexec to support weird filesystems In particular, some of our repos are stored on a fileserver that simulates POSIX permissions poorly, in such a way that prevents the removal of execute permission. This causes rhg show a spurious unclean status, even though python hg reports the repo as clean. We fix this by making rhg implement the ~same checkexec logic that python hg does.
Fri, 06 Jan 2023 12:16:04 -0500 convert: stop passing str to the dateutil API in darcs stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 06 Jan 2023 12:16:04 -0500] rev 49893
convert: stop passing str to the dateutil API in darcs I'm sure there's a bunch more stuff in here that's broken, but this was flagged by pytype.
Thu, 05 Jan 2023 19:47:35 -0500 sparse: fix a py2 based usage of `map()` stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Jan 2023 19:47:35 -0500] rev 49892
sparse: fix a py2 based usage of `map()` In a local pytype run, this fixes: File "/mnt/c/Users/Matt/hg/hgext/sparse.py", line 386, in debugsparse: unsupported operand type(s) for item retrieval: 'fcounts: Iterator[int]' and '0: int' [unsupported-operands] No attribute '__getitem__' on 'fcounts: Iterator[int]' File "/mnt/c/Users/Matt/hg/hgext/sparse.py", line 387, in debugsparse: unsupported operand type(s) for item retrieval: 'fcounts: Iterator[int]' and '1: int' [unsupported-operands] No attribute '__getitem__' on 'fcounts: Iterator[int]' File "/mnt/c/Users/Matt/hg/hgext/sparse.py", line 388, in debugsparse: unsupported operand type(s) for item retrieval: 'fcounts: Iterator[int]' and '2: int' [unsupported-operands] No attribute '__getitem__' on 'fcounts: Iterator[int]'
Thu, 05 Jan 2023 17:38:14 -0500 histedit: byteify the help for the multifold action stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Jan 2023 17:38:14 -0500] rev 49891
histedit: byteify the help for the multifold action While there's some allowance for str in `_()`, it's commented to be for "goofy unicode docstrings in test", so no idea how well that works, but it should at least come back as bytes. With HGPLAIN, however, the str isn't touched and is returned as-is, so this seems like a real bug.
Wed, 11 Jan 2023 16:16:06 +0000 typing: use python3-style type annotation
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 11 Jan 2023 16:16:06 +0000] rev 49890
typing: use python3-style type annotation
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 tip