[PATCH 4 of 7] patch.difffeatureopts: add a feature for diff.git

Siddharth Agarwal sid at less-broken.com
Tue Nov 25 12:39:25 CST 2014


On 11/25/2014 07:36 AM, Augie Fackler wrote:
> On Fri, Nov 21, 2014 at 05:00:06PM -0800, Siddharth Agarwal wrote:
>> # HG changeset patch
>> # User Siddharth Agarwal <sid0 at fb.com>
>> # Date 1416359414 28800
>> #      Tue Nov 18 17:10:14 2014 -0800
>> # Node ID 959a08bde79e880c8ce3ed638a5e4f242db6d1a0
>> # Parent  ec03d9f0198eafe8933924bbeadd2586866eb9f7
>> patch.difffeatureopts: add a feature for diff.git
>>
>> This deserves to be its own feature -- indeed, this is often the only feature
>> several commands care about.
>>
>> diff --git mercurial/patch.py mercurial/patch.py
>> --- mercurial/patch.py
>> +++ mercurial/patch.py
>> @@ -1559,11 +1559,12 @@
>>       pass
>>
>>   def diffallopts(ui, opts=None, untrusted=False, section='diff'):
>> -    return difffeatureopts(ui, opts=opts, untrusted=untrusted, section=section)
>> +    return difffeatureopts(ui, opts=opts, untrusted=untrusted, section=section,
>> +                           git=True)
>>
>>   diffopts = diffallopts
>>
>> -def difffeatureopts(ui, opts=None, untrusted=False, section='diff'):
>> +def difffeatureopts(ui, opts=None, untrusted=False, section='diff', git=False):
> This function is begging for a docstring that describes what the
> various options mean. In this change it's still kind of guessable, but
> a couple of patches later it becomes pretty subtle.

Would you prefer a V2 or a followup?


More information about the Mercurial-devel mailing list