comparison rust/hg-core/src/config/config.rs @ 47189:b0e92313107e

parselist: move the function from config to stringutil We move the function in a lower level module to avoid cycle. It moves next to `parsebool` who had to migrate for the same reasons. Differential Revision: https://phab.mercurial-scm.org/D10449
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 16 Apr 2021 01:18:28 +0200
parents bcdcb4423ae3
children 3237ed4dcda4
comparison
equal deleted inserted replaced
47188:353718f741a8 47189:b0e92313107e
359 359
360 /// Returns the corresponding list-value in the config if found, or `None`. 360 /// Returns the corresponding list-value in the config if found, or `None`.
361 /// 361 ///
362 /// This is appropriate for new configuration keys. The value syntax is 362 /// This is appropriate for new configuration keys. The value syntax is
363 /// **not** the same as most existing list-valued config, which has Python 363 /// **not** the same as most existing list-valued config, which has Python
364 /// parsing implemented in `parselist()` in `mercurial/config.py`. 364 /// parsing implemented in `parselist()` in
365 /// Faithfully porting that parsing algorithm to Rust (including behavior 365 /// `mercurial/utils/stringutil.py`. Faithfully porting that parsing
366 /// that are arguably bugs) turned out to be non-trivial and hasn’t been 366 /// algorithm to Rust (including behavior that are arguably bugs)
367 /// completed as of this writing. 367 /// turned out to be non-trivial and hasn’t been completed as of this
368 /// writing.
368 /// 369 ///
369 /// Instead, the "simple" syntax is: split on comma, then trim leading and 370 /// Instead, the "simple" syntax is: split on comma, then trim leading and
370 /// trailing whitespace of each component. Quotes or backslashes are not 371 /// trailing whitespace of each component. Quotes or backslashes are not
371 /// interpreted in any way. Commas are mandatory between values. Values 372 /// interpreted in any way. Commas are mandatory between values. Values
372 /// that contain a comma are not supported. 373 /// that contain a comma are not supported.