Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 04 Oct 2021 19:06:45 +0100] rev 48236
rhg: faster hg cat when many files are requested
With this patch I'm seeing a ~39ms improvement (220ms -> 181ms) when
running [hg cat] on ~220 files in a ~260k-file repo.
The timing for [hg cat] on an individual file becomes slightly worse
(losing 5ms: 145ms -> 150ms).
A follow-up commit is intended to improve that.
Differential Revision: https://phab.mercurial-scm.org/D11615
Simon Sapin <simon.sapin@octobus.net> [Fri, 16 Jul 2021 18:42:20 +0200] rev 48235
dirstate-v2: Add support when Rust is not enabled
This wires into `dirstatemap` the parser and serializer added in previous
changesets. The memory representation is still the same, with a flat `dict`
for `DirstateItem`s and another one for copy sources. Serialization always
creates a new dirstate-v2 data file and does not support (when Rust is not
enabled) appending to an existing one, since we don’t keep track of which
tree nodes are new or modified. Instead the tree is reconstructed during
serialization.
Differential Revision: https://phab.mercurial-scm.org/D11520
Raphaël Gomès <rgomes@octobus.net> [Thu, 22 Jul 2021 17:31:37 +0200] rev 48234
dirstate-v2: Initial Python serializer
This adds code seralizing a `map` and `copy_map` dicts into dirstate-v2
file formate. This is not used yet.
Differential Revision: https://phab.mercurial-scm.org/D11519
Simon Sapin <simon.sapin@octobus.net> [Sun, 03 Oct 2021 13:18:03 +0200] rev 48233
dirstate-v2: initial Python parser
The dirstate-v2 file format should be supported even if Rust extensions are
not enabled. This changeset adds parsing code that is not used yet.
Differential Revision: https://phab.mercurial-scm.org/D11518
Simon Sapin <simon.sapin@octobus.net> [Fri, 08 Oct 2021 13:15:22 +0200] rev 48232
dirstate: Move more methods to the _dirstatemapcommon base class
This reduces duplication slightly and will help with supporting dirstate-v2
when Rust is not enabled.
Differential Revision: https://phab.mercurial-scm.org/D11621
Simon Sapin <simon.sapin@octobus.net> [Wed, 13 Oct 2021 17:32:52 +0200] rev 48231
dirstate-v2: Add storage space for nanoseconds precision in file mtimes
For now the sub-second component is always set to zero for tracked files and
symlinks. (The mtime of directories for the `readdir`-skipping optimization
is a different code path and already uses the full precision available.)
This extra storage uses the space previously freed by replacing the 32-bit
`mode` field by two bits in the existing `flags` field, so the overall size
of nodes is unchanged. (This space had been left as padding for this purpose.)
Also move things around in the node layout and documentation to have less
duplication. Now that they have the same representation, directory mtime and
file mtime are kept in the same field. (Only either one can exist for a given
node.)
Differential Revision: https://phab.mercurial-scm.org/D11655
Simon Sapin <simon.sapin@octobus.net> [Wed, 13 Oct 2021 16:21:39 +0200] rev 48230
status: Extract TruncatedTimestamp from fs::Metadata without SystemTime
On Unix, the Rust standard library exposes `mtime` and `mtime_nsec` methods
for `std::fs::Metada` whih is exactly what we need to construct a
`TruncatedTimestamp`. This skips the computation in the conversion through
`SystemTime` and `Result<Duration, Duration>`.
Differential Revision: https://phab.mercurial-scm.org/D11654