[PATCH RFC] HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT

Erik Zielke ez at aragost.com
Wed Jan 5 06:36:14 CST 2011


On 05-01-2011 13:13, Brodie Rao wrote:
> On Jan 5, 2011, at 3:55 AM, Erik Zielke wrote:
>
>> Den 04-01-2011 14:21, Brodie Rao skrev:
>>> # HG changeset patch
>>> # User Brodie Rao<brodie at bitheap.org>
>>> # Date 1294147116 -39600
>>> # Node ID b653ec8e753a01653d46c70c56e72a37f5906f58
>>> # Parent  f3058dd052819de75908599d93a29241ba69318f
>>> HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
>>>
>>> This makes it possible to gain the benefits of HGPLAIN for scripting
>>> while preserving different behaviors like internationalization.
>> I can definitiely see that people writing tools and scripts on top of 
>> Mercurial can use feature like this.
>>
>>> diff --git a/mercurial/help/environment.txt 
>>> b/mercurial/help/environment.txt
>>> --- a/mercurial/help/environment.txt
>>> +++ b/mercurial/help/environment.txt
>>> @@ -59,6 +59,14 @@ HGPLAIN
>>>      Equivalent options set via command line flags or environment
>>>      variables are not overridden.
>>>
>>> +HGPLAINEXCEPT
>>> +    This is a comma-separated list of features to preserve when
>>> +    HGPLAIN is enabled. Currently the only value supported is "i18n",
>>> +    which preserves internationalization in plain mode.
>>> +
>>> +    Setting HGPLAINEXCEPT to anything (even an empty string) will
>>> +    enable plain mode.
>>> +
>> Wouldn't it make sense to issue a warning, if an unsupported value is 
>> in HGPLAINEXCEPT? This would of course mean that there should be a 
>> way of specifying supported values.
>
> I'm not sure. The current behavior is similar to how settings in hgrc 
> work--Mercurial won't warn you about unknown settings. This makes the 
> code somewhat simpler, and it moves the definition of plain modes onto 
> their users.
Okay fine.

--
Erik Zielke
aragost Trifork ag


More information about the Mercurial-devel mailing list