[PATCH 2 of 2] acl: Allow non-exact matches for deny/allow branches (question to elifarley at gmail.com)

vitalif at yourcmc.ru vitalif at yourcmc.ru
Tue Jul 31 17:33:13 CDT 2012


On Tue, 31 Jul 2012 20:33:15 +0200, Mads Kiilerich wrote:
> On 12/07/12 22:48, Vitaliy Filippov wrote:
>> # HG changeset patch
>> # User Vitaliy Filippov <vitalif at yourcmc.ru>
>> # Date 1342116963 -14400
>> # Node ID 82a1fa32f162636c01f6af5b00b2080eea1f986c
>> # Parent  2422f58a70bcfbf20ec42edf9e1353fdc3f2bfc2
>> acl: Allow non-exact matches for deny/allow branches
>>
>> Usage example (does not work without this patch):
>>
>> [acl.deny.branches]
>> re:\d+ = *
>>
>> diff -r 2422f58a70bc -r 82a1fa32f162 hgext/acl.py
>> --- a/hgext/acl.py	Thu Jul 12 22:14:33 2012 +0400
>> +++ b/hgext/acl.py	Thu Jul 12 22:16:03 2012 +0400
>> @@ -287,8 +287,8 @@
>>           ui.readconfig(cfg, sections = ['acl.groups', 
>> 'acl.allow.branches',
>>           'acl.deny.branches', 'acl.allow', 'acl.deny'])
>>   -    allowbranches = buildmatch(ui, None, user, 
>> 'acl.allow.branches')
>> -    denybranches = buildmatch(ui, None, user, 'acl.deny.branches')
>> +    allowbranches = buildmatch(ui, repo, user, 
>> 'acl.allow.branches')
>> +    denybranches = buildmatch(ui, repo, user, 'acl.deny.branches')
>>       allow = buildmatch(ui, repo, user, 'acl.allow')
>>       deny = buildmatch(ui, repo, user, 'acl.deny')
>
> The buildmatch invocations with repo=None was added by
> http://selenic.com/repo/hg/rev/2dd91779eb27 . There must have been a
> reason for that. It shouldn't be changed without understanding the
> reason. The mailing list archives might reveal something. The old and
> new reasoning should probably be mentioned briefly in the commit
> description.

Maybe we'll ask the commit author why did he use buildmatch(ui, None) 
and not buildmatch(ui, repo)?

Elifarley Callado Coelho Cruz <elifarley at gmail.com>

Maybe you'll answer us?


More information about the Mercurial-devel mailing list