[PATCH] commitextras: move fb's extension which add extras to a commit to core

Durham Goode durham at fb.com
Tue Jul 11 14:16:30 EDT 2017



On 7/7/17 11:37 AM, Martin von Zweigbergk via Mercurial-devel wrote:
> On Fri, Jul 7, 2017 at 11:33 AM, Sean Farley <sean at farley.io> wrote:
>>
>> Kevin Bullock <kbullock+mercurial at ringworld.org> writes:
>>
>>>> On Jul 7, 2017, at 13:25, Martin von Zweigbergk via Mercurial-devel <mercurial-devel at mercurial-scm.org> wrote:
>>>>
>>>> On Fri, Jul 7, 2017 at 11:23 AM, Sean Farley <sean at farley.io> wrote:
>>>>>
>>>>> Yuya Nishihara <yuya at tcha.org> writes:
>>>>>>
>>>>>> debugcommit seems fine.
>>>>>>
>>>>>> FWIW, --extra value will need some encoding handling depending on its
>>>>>> type, e.g. convert labels to utf-8, but keep file path as bytes.
>>>>>
>>>>> Yeah, seems fine to me too. But was there any reason we're avoiding the
>>>>> path of new-thing-as-extension first, then into core second?
>>>>
>>>> If we decide to put it in debugcommit, we provide no BC guarantee
>>>> (AFAIK), so we can remove it later if we see a reason. That buys us
>>>> the same flexibility as having it in an extensions, it seems.
>>>
>>> Hmm, I'm not sure we throw out BC guarantees for debug commands. Per <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mercurial-2Dscm.org_wiki_CompatibilityRules-23Commands&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=nuarHzhP1wi1T9iURRCj1A&m=_pMWbdg-fz5RQSQRthyoxFuAzNIkj6NupzvxLqCheMI&s=CcMcfcG2-x3ih73Z9U1OcgyMFSqwA3DJgcrik0n0u2U&e= >, there is somewhat of a gradient to the strength of BC guarantees, but as I read it, debug commands aren't exempt.
>>>
>>> Also just as a reminder for those following along, we only suspend the BC guarantees for extensions that are marked EXPERIMENTAL.
>>
>> Ah, yeah. Though, I might disagree a bit with debug* being BC that's
>> another discussion entirely.
>
> That's unclear to me too.
>
>>
>> For this case, it would seem that marking this as an EXPERIMENTAL
>> extension that adds the 'debugcommit' command would cover all these
>> points / issues?
>
> I agree, that sounds like our safest bet.

Having the option be on 'hg debugcommit' is kinda awkward for us.  Our 
main use of --extras is from services and automation. Having to teach 
the people writing these services to use debugcommit in one situation 
and normal commit in another will just cause confusion and bugs. If it's 
an extension anyways, users (or sys-admins) have to opt-in to the option 
anyway, so I think opt'ing in to 'hg commit --extras' once via config is 
better than having them opt-in to using 'hg debugcommit' for every 
invocation of commit that could be affected.


More information about the Mercurial-devel mailing list