Thu, 11 Feb 2021 15:51:11 +0100 rust: Add a log file rotation utility
Simon Sapin <simon.sapin@octobus.net> [Thu, 11 Feb 2021 15:51:11 +0100] rev 46599
rust: Add a log file rotation utility This is ported to Rust from `mercurial/loggingutil.py`. The "builder" pattern is used to make it visible at call sites what the two numeric parameters mean. In Python they might simply by keyword arguments. Differential Revision: https://phab.mercurial-scm.org/D10010
Tue, 16 Feb 2021 15:22:20 +0100 rust: Add a `ConfigValueParseError` variant to common errors
Simon Sapin <simon.sapin@octobus.net> [Tue, 16 Feb 2021 15:22:20 +0100] rev 46598
rust: Add a `ConfigValueParseError` variant to common errors Configuration files are parsed into sections of key/value pairs when they are read, but at that point values are still arbitrary bytes. Only when a value is accessed by various parts of the code do we know its expected type and syntax, so values are parsed at that point. Let’s make a new error type for this latter kind of parsing error, and add a variant to the common `HgError` so that most code can propagate it without much boilerplate. Differential Revision: https://phab.mercurial-scm.org/D10009
Tue, 16 Feb 2021 13:55:31 +0100 rust: Add config parsing support for more value types
Simon Sapin <simon.sapin@octobus.net> [Tue, 16 Feb 2021 13:55:31 +0100] rev 46597
rust: Add config parsing support for more value types * Rust `str` (ASCII or UTF-8) * Integer * Byte quantities Differential Revision: https://phab.mercurial-scm.org/D10008
Wed, 17 Feb 2021 11:21:34 +0100 rust: Introduce a get_bytes_from_os_str utility function
Simon Sapin <simon.sapin@octobus.net> [Wed, 17 Feb 2021 11:21:34 +0100] rev 46596
rust: Introduce a get_bytes_from_os_str utility function It does the same as get_bytes_from_path but takes an `OsStr` instead of a `Path`. The implementation is the same so using either ends up correct but the function name suggests it’s not. Differential Revision: https://phab.mercurial-scm.org/D10007
Wed, 17 Feb 2021 12:24:53 +0100 rust: Make `DirstateParents`’s fields typed `Node`s
Simon Sapin <simon.sapin@octobus.net> [Wed, 17 Feb 2021 12:24:53 +0100] rev 46595
rust: Make `DirstateParents`’s fields typed `Node`s Instead of plain byte arrays. Differential Revision: https://phab.mercurial-scm.org/D10006
Wed, 17 Feb 2021 12:06:56 +0100 rust: Rewrite dirstate parsing usin the `bytes-cast` crate
Simon Sapin <simon.sapin@octobus.net> [Wed, 17 Feb 2021 12:06:56 +0100] rev 46594
rust: Rewrite dirstate parsing usin the `bytes-cast` crate Differential Revision: https://phab.mercurial-scm.org/D10005
Mon, 15 Feb 2021 20:13:09 +0100 rhg: Move `Repo` object creation into `main()`
Simon Sapin <simon.sapin@octobus.net> [Mon, 15 Feb 2021 20:13:09 +0100] rev 46593
rhg: Move `Repo` object creation into `main()` … rather than in each sub-command that needs a local repository. This will allow accessing e.g. `.hg/blackbox.log` before dispatching to sub-commands. Differential Revision: https://phab.mercurial-scm.org/D10004
Mon, 15 Feb 2021 20:05:32 +0100 rhg: Group values passed to every sub-command into a struct
Simon Sapin <simon.sapin@octobus.net> [Mon, 15 Feb 2021 20:05:32 +0100] rev 46592
rhg: Group values passed to every sub-command into a struct The set of which values this is is evidently not stable yet, so this will make changes easier. Also it is growing, and the function signatures are getting out hand. Differential Revision: https://phab.mercurial-scm.org/D10003
Fri, 12 Feb 2021 16:54:30 +0100 rhg: Remove error message on unsupported CLI arguments
Simon Sapin <simon.sapin@octobus.net> [Fri, 12 Feb 2021 16:54:30 +0100] rev 46591
rhg: Remove error message on unsupported CLI arguments Like in other "unsupported" cases that return a specific exit code Differential Revision: https://phab.mercurial-scm.org/D10002
Tue, 05 Jan 2021 21:46:21 +0100 copies-rust: send PyBytes values back be dropped ino the parent thread
Simon Sapin <simon.sapin@octobus.net> [Tue, 05 Jan 2021 21:46:21 +0100] rev 46590
copies-rust: send PyBytes values back be dropped ino the parent thread … instead of acquiring the GIL in the Rust thread in the Drop impl This commit is based on the premise that crossbeam-channel with unbounded send and non-blocking receive is faster than a contended GIL, but that remains to be measured. Differential Revision: https://phab.mercurial-scm.org/D9686
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip