[PATCH 2 of 2 V2] show: new extension for displaying various repository data

Ryan McElroy rm at fb.com
Sat Mar 25 09:02:28 EDT 2017



On 3/25/17 5:22 AM, Yuya Nishihara wrote:
> On Thu, 23 Mar 2017 11:38:45 -0400, Augie Fackler wrote:
>> On Thu, Mar 23, 2017 at 12:16:16AM +0900, Yuya Nishihara wrote:
>>> On Tue, 21 Mar 2017 23:52:42 -0700, Gregory Szorc wrote:
>>>> On Tue, Mar 21, 2017 at 11:49 PM, Gregory Szorc <gregory.szorc at gmail.com>
>>>> wrote:
>>>>
>>>>> # HG changeset patch
>>>>> # User Gregory Szorc <gregory.szorc at gmail.com>
>>>>> # Date 1490165337 25200
>>>>> #      Tue Mar 21 23:48:57 2017 -0700
>>>>> # Node ID 80ca2bee4a06887f918e3328b3f005e4c1cb1ab1
>>>>> # Parent  ae796e23fd42b036352b298f570af8949c2db2d9
>>>>> show: new extension for displaying various repository data
>>>>>
>>>> Yuya, et al:
>>>>
>>>> Since the default output isn't covered by BC guarantees, we probably want
>>>> HGPLAIN to be. I'm not sure what the preferred way to do that should be.
>>>> Should I create a separate topic within the template for the plain view?
>>> No idea about BC guarantees vs HGPLAIN. HGPLAIN is to disable user
>>> configuration. If "hg show" is covered by e.g. compat version, we'll only
>>> need to set it to the lowest version if HGPLAIN set.
>> My vision for `hg show` was that we document it as having explicitly
>> unstable output and unsuitable for scripting. Perhaps in light of
>> that, HGPLAIN=1 should cause `hg show` to say `abort: show is only for
>> humans, you appear to be a robot` or similar.
> Makes some sense, but `hg show` would support -Tjson, which is for scripting.

I basically agree, see my comment in my review:

 > We should consider aborting if HGPLAIN=1 and no template is 
specified, in fact!

I think that gives us behavior everyone would be fairly happy with: 
abort if HGPLAIN is specified without a template, would would lead to 
unstable output.


More information about the Mercurial-devel mailing list