Mon, 09 Jan 2023 18:00:56 +0100 rust: fix broken debug assertions
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 18:00:56 +0100] rev 49916
rust: fix broken debug assertions These were caught by `clippy`. It appears no one uses the debug builds, which is how this wasn't caught before.
Mon, 09 Jan 2023 17:48:54 +0100 rust-narrow: fix loop that never loops
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 17:48:54 +0100] rev 49915
rust-narrow: fix loop that never loops This was caught by `clippy`. I guess the narrow tests leave something to be desired, since this previously only checked the first valid pattern.
Mon, 09 Jan 2023 17:40:03 +0100 rust: run `cargo clippy`
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 17:40:03 +0100] rev 49914
rust: run `cargo clippy` These automatic fixes are good to have because they make the code more idiomatic and less surprising. The transform from `sort` -> `sort_unstable` is questionable, but this is only in a test, so it doesn't matter in our case.
Fri, 06 Jan 2023 18:52:04 +0100 rust: use `logging_timer` instead of `micro_timer`
Raphaël Gomès <rgomes@octobus.net> [Fri, 06 Jan 2023 18:52:04 +0100] rev 49913
rust: use `logging_timer` instead of `micro_timer` I am the author of `micro_timer`. I built it at the time because I couldn't find a crate that was simple to use and flexible to do function timing with. Turns out I just couldn't find it because crates.io's search isn't all that great, or maybe I didn't look hard enough. `logging_timer` is better in every way: - supports changing the logging level - supports start and end logging - supports intermediary messages - supports inline macros - supports formatting the output - better IDE/tree-sitter integration thanks to a more robust proc macro I also changed all uses to one-liners, so it's easier to copy-paste.
Thu, 12 Jan 2023 16:15:51 +0000 pathauditor: make _checkfs_exists a static method
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 12 Jan 2023 16:15:51 +0000] rev 49912
pathauditor: make _checkfs_exists a static method This fixes the bug detected by pytype where the auditor used in vfs.py may be a no-op auditor (vfs.py, line 398), which doesn't have the _checkfs_exists method.
Thu, 12 Jan 2023 13:14:00 +0000 merge: add mergeresult.mapaction to improve speed
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 12 Jan 2023 13:14:00 +0000] rev 49911
merge: add mergeresult.mapaction to improve speed As a part of [hg update] we convert all [ACTION_CREATED] merge results into [ACTION_GET] actions, and that's slightly inefficient because every insertion pays the full cost of maintaining the [mergeresult] data structure up to date. This commit adds a function [mapaction], which is faster. (saves around 0.3s on a large update involving ~400k files)
Wed, 04 Jan 2023 19:30:47 +0000 merge: avoid dereferencing repo fields repeatedly
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 04 Jan 2023 19:30:47 +0000] rev 49910
merge: avoid dereferencing repo fields repeatedly
Fri, 06 Jan 2023 18:09:19 +0000 merge: skip syntactic path checks in [_checkunknownfile]
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 06 Jan 2023 18:09:19 +0000] rev 49909
merge: skip syntactic path checks in [_checkunknownfile] We don't need to check the paths syntactically, since they are coming from diffing the revisions, so hopefully already checked on the way in. We still need to check what's on the filesystem, to avoid traversing the symlinks or subdirs, which we can't know about statically. Also, we use the directory audit to elide [isfileorlink], this removing ~all lstat calls from hg updates from-empty.
Fri, 06 Jan 2023 16:42:24 +0000 pathutil: use `finddirs_rev_noroot` instead of `parts`
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 06 Jan 2023 16:42:24 +0000] rev 49908
pathutil: use `finddirs_rev_noroot` instead of `parts` The benefit this brings is very tiny, if it's even there, since we still didn't get rid of the [parts] computation. It probably won't be worth it without the subsequent patch that adds one more use of [finddirs_rev_noroot]
Fri, 06 Jan 2023 17:29:42 +0000 pathutil: add the more efficient finddir iterator
Arseniy Alekseyev <aalekseyev@janestreet.com> [Fri, 06 Jan 2023 17:29:42 +0000] rev 49907
pathutil: add the more efficient finddir iterator (to be used in subsequent commits)
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 tip