[PATCH V2] histedit: add a config allowing changing histedit rule line length limit

Gregory Szorc gregory.szorc at gmail.com
Fri Feb 27 20:33:29 CST 2015


On Thu, Feb 26, 2015 at 12:42 PM, Jordi GutiƩrrez Hermoso <
jordigh at octave.org> wrote:

> On Thu, 2015-02-26 at 10:14 -0800, Mateusz Kwapich wrote:
> > # HG changeset patch
> > # User Mateusz Kwapich <mitrandir at fb.com>
> > # Date 1421880324 28800
> > #      Wed Jan 21 14:45:24 2015 -0800
> > # Node ID e75e5456ec6971fb50263ca4526291d9a10ff01a
> > # Parent  ff5caa8dfd993680d9602ca6ebb14da9de10d5f4
> > histedit: add a config allowing changing histedit rule line length limit
> [snip]
> > +Histedit rule lines are truncated to 80 characters by default. You can
> > +customize this behaviour by setting histedit.linelen in your hg config
> > +to desired length.
>
> Sorry to bikeshed more, but I think the typical way to document such
> features is to show what should be copied to the config file. I would
> write,
>
>     Histedit rule lines are truncated to 80 characters by default. You
>     can customise this behaviour by setting a different length in your
>     configuration file:
>
>         [histedit]
>         linelen = 120      # truncate rule lines at 120 characters
>
> This appears to be the style in e.g. `hg help -e patchbomb`, `hg help
> -e progress` or `hg help -e highlight`.
>

As I was writing some help patches a few weeks ago, I was trying to come up
with a way for config options related to extensions to be surfaced better.
The best I got was a separate docstring variable that could be inserted
into `hg help config`.

Another problem I've seen is that some core options aren't documented in
`hg help config` at all. I understand not wanting to expose some really
advanced options. But digging through source to discover hidden knobs is no
fun either. I don't want to say a registry of config options would be
useful. But it does solve a lot of problems for option discovery.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150227/331fa574/attachment.html>


More information about the Mercurial-devel mailing list