Wed, 17 Feb 2021 20:40:19 +0100 rust: Add some unit tests for parse_byte_size in config
Simon Sapin <simon.sapin@octobus.net> [Wed, 17 Feb 2021 20:40:19 +0100] rev 46603
rust: Add some unit tests for parse_byte_size in config Differential Revision: https://phab.mercurial-scm.org/D10022
Wed, 17 Feb 2021 20:24:04 +0100 rust: Move config value parsing functions to a new module
Simon Sapin <simon.sapin@octobus.net> [Wed, 17 Feb 2021 20:24:04 +0100] rev 46602
rust: Move config value parsing functions to a new module Differential Revision: https://phab.mercurial-scm.org/D10021
Tue, 16 Feb 2021 13:08:37 +0100 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net> [Tue, 16 Feb 2021 13:08:37 +0100] rev 46601
rhg: Add support for the blackbox extension Only `command` and `commandfinish` events are logged. The `dirty`, `logsource`, `track` and `ignore` configuration items are not supported yet. To indicate commands executed without Python, a `(rust) ` prefix is added in corresponding log messages. Differential Revision: https://phab.mercurial-scm.org/D10012
Wed, 17 Feb 2021 13:00:25 +0100 blackbox: Remove misleading quotes in config example
Simon Sapin <simon.sapin@octobus.net> [Wed, 17 Feb 2021 13:00:25 +0100] rev 46600
blackbox: Remove misleading quotes in config example This example previously looked like quotes were part of configuration file syntax, and the parsed `date-format` value was the part inside of them. This is not the case: config syntax only parses quotes in list values. Instead using that config would result in literal quotes being written to `.hg/blackbox.log` as part of the date format. This changes the example to what was probably intended. Differential Revision: https://phab.mercurial-scm.org/D10011
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
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -7 +7 +10 +30 +100 +300 +1000 +3000 tip