##// END OF EJS Templates
configitems: declare items in a TOML file...
configitems: declare items in a TOML file Mercurial ships with Rust code that also needs to read from the config. Having a way of presenting `configitems` to both Python and Rust is needed to prevent duplication, drift, and have the appropriate devel warnings. Abstracting away from Python means choosing a config format. No single format is perfect, and I have yet to come across a developer that doesn't hate all of them in some way. Since we have a strict no-dependencies policy for Mercurial, we either need to use whatever comes with Python, vendor a library, or implement a custom format ourselves. Python stdlib means using JSON, which doesn't support comments and isn't great for humans, or `configparser` which is an obscure, untyped format that nobody uses and doesn't have a commonplace Rust parser. Implementing a custom format is error-prone, tedious and subject to the same issues as picking an existing format. Vendoring opens us to the vast array of common config formats. The ones being picked for most modern software are YAML and TOML. YAML is older and common in the Python community, but TOML is much simpler and less error-prone. I would much rather be responsible for the <1000 lines of `tomli`, on top of TOML being the choice of the Rust community, with robust crates for reading it. The structure of `configitems.toml` is explained inline.

File last commit:

r35052:e9a8a941 default
r51655:c51b178b default
Show More
changelogentry.tmpl
16 lines | 489 B | application/x-cheetah | CheetahLexer
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 <div>
av6
hgweb: split long lines in gitweb and monoblue (changeset summary and tags)
r35051 <a class="title" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">
<span class="age">{date|rfc822date}</span>
{desc|strip|firstline|escape|nonempty}
av6
hgweb: move changeset "tags" to a template in map file (gitweb and monoblue)...
r35052 {alltags}
av6
hgweb: split long lines in gitweb and monoblue (changeset summary and tags)
r35051 </a>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 </div>
<div class="title_text">
<div class="log_link">
Thomas Arendsen Hein
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names...
r18526 <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a><br/>
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 </div>
<i>{author|obfuscate} [{date|rfc822date}] rev {rev}</i><br/>
</div>
Gregory Szorc
gitweb: preserve whitespace in description...
r33557 <div class="log_body description">{desc|strip|escape|websub|nonempty}
Dan Villiom Podlaski Christiansen
setup: install translation files as package data...
r9999 </div>