Fri, 08 Apr 2022 17:55:03 +0200 rust-dirstatemap: add simpler version of `get_node_mut`
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 17:55:03 +0200] rev 49133
rust-dirstatemap: add simpler version of `get_node_mut` This will help reduce code and footgun potential for simpler callers. Differential Revision: https://phab.mercurial-scm.org/D12531
Fri, 08 Apr 2022 17:22:39 +0200 rust-dirstatemap: use `get_node_mut` instead or `get_or_insert_node`
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 17:22:39 +0200] rev 49132
rust-dirstatemap: use `get_node_mut` instead or `get_or_insert_node` This (along with the docstring), makes it more obvious that we're not expecting to insert a node here. This is less prone to bugs in later refactorings. Differential Revision: https://phab.mercurial-scm.org/D12530
Fri, 08 Apr 2022 16:56:52 +0200 rust-dirstatemap: add `each_ancestor` argument to `get_node_mut`
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:56:52 +0200] rev 49131
rust-dirstatemap: add `each_ancestor` argument to `get_node_mut` This forces the callers to think about if the counters in the ancestors need to be adjusted. Differential Revision: https://phab.mercurial-scm.org/D12529
Fri, 08 Apr 2022 16:53:06 +0200 rust-dirstatemap: add simpler method `get_or_insert_node` for the common case
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:53:06 +0200] rev 49130
rust-dirstatemap: add simpler method `get_or_insert_node` for the common case All but one case use the exact same input for most arguments, this simplifies code and reduces footgun potential. Differential Revision: https://phab.mercurial-scm.org/D12528
Fri, 08 Apr 2022 16:05:47 +0200 rust-dirstatemap: inline the last `get_or_insert` call
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:05:47 +0200] rev 49129
rust-dirstatemap: inline the last `get_or_insert` call The `get_or_insert` method was dangerous because it did not take the `DirstateMap` counters into account. This particular instance does not need to update the counters. Differential Revision: https://phab.mercurial-scm.org/D12527
Fri, 08 Apr 2022 16:04:17 +0200 rust-dirstatemap: add `set_cached_mtime` helper method
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:04:17 +0200] rev 49128
rust-dirstatemap: add `set_cached_mtime` helper method This will help remove the `get_or_insert` method, which is dangerous because it does not take the `DirstateMap` counters into account Differential Revision: https://phab.mercurial-scm.org/D12526
Fri, 08 Apr 2022 16:03:39 +0200 rust-dirstatemap: add `clear_cached_mtime` helper method
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:03:39 +0200] rev 49127
rust-dirstatemap: add `clear_cached_mtime` helper method This will help remove the `get_or_insert` method, which is dangerous because it does not take the `DirstateMap` counters into account. Differential Revision: https://phab.mercurial-scm.org/D12525
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -7 +7 +10 +30 +100 +300 +1000 tip