[PATCH 8 of 8] configitems: register 'ui.clonebundleprefers' as example for 'configlist'

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Jun 23 11:01:43 EDT 2017


On 06/23/2017 04:47 PM, Yuya Nishihara wrote:
> On Wed, 21 Jun 2017 10:55:09 +0200, Pierre-Yves David wrote:
>> # HG changeset patch
>> # User Pierre-Yves David <pierre-yves.david at octobus.net>
>> # Date 1497698742 -7200
>> #      Sat Jun 17 13:25:42 2017 +0200
>> # Node ID c4b137fd72618fc5c761304bddf5ac9d2b887305
>> # Parent  71c55875e1d4342eb1165a81e45dd8ac42b546fa
>> # EXP-Topic config.register
>> # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
>> #              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r c4b137fd7261
>> configitems: register 'ui.clonebundleprefers' as example for 'configlist'
>>
>> This exercise the default value handling in 'configlist'.
>>
>> diff --git a/mercurial/configitems.py b/mercurial/configitems.py
>> --- a/mercurial/configitems.py
>> +++ b/mercurial/configitems.py
>> @@ -39,6 +39,9 @@ def coreconfigitem(*args, **kwargs):
>>   coreconfigitem('patch', 'fuzz',
>>       default=2,
>>   )
>> +coreconfigitem('ui', 'clonebundleprefers',
>> +    default=[],
>> +)
> 
> Perhaps this list would be returned to the caller without copying, and could
> be mutated unintentionally?

Good catch, I'll follow up.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list