You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan <lu...@gmx.de> on 2016/10/12 10:48:39 UTC

[PATCH] Fix number of array elements

Hi,

hope this patch is correct... As far as I  see the number of elements is
off by one here:

[[[
Allocate the correct number of element entries.

* subversion/libsvn_client/conflicts.c
  (svn_client_conflict_text_get_resolution_options): Correct number of array
  entires.
]]]


Regards,
Stefan


Re: [PATCH] Fix number of array elements

Posted by Stefan <lu...@posteo.de>.
On 10/12/2016 1:22 PM, Daniel Shahaf wrote:
> Stefan wrote on Wed, Oct 12, 2016 at 13:17:50 +0200:
>> On 10/12/2016 12:58 PM, Ivan Zhakov wrote:
>>> PS: Please submit patches with text/plain mime type as recommended in
>>> Community Guide [1]
>>> [1] https://subversion.apache.org/docs/community-guide/general.html#patches-submission
>> Didn't realize my mail client did send them with the wrong mime-type.
>> Thanks for pointing that out. Donno how to change that atm, looks like
>> I've to inline patches directly in the mail from now on.
> Name the attachment with a ".txt" extension.

Ivan just suggested the same... Gonna try that the next time... FTR: The
mime type is set correctly as it seems, the base64-encoding though is
not too optimal:

Content-Type: text/x-diff;
 name="conflicts.c.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="conflicts.c.patch"

Regards,
Stefan



Re: [PATCH] Fix number of array elements

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Stefan wrote on Wed, Oct 12, 2016 at 13:17:50 +0200:
> On 10/12/2016 12:58 PM, Ivan Zhakov wrote:
> > PS: Please submit patches with text/plain mime type as recommended in
> > Community Guide [1]
> > [1] https://subversion.apache.org/docs/community-guide/general.html#patches-submission
> Didn't realize my mail client did send them with the wrong mime-type.
> Thanks for pointing that out. Donno how to change that atm, looks like
> I've to inline patches directly in the mail from now on.

Name the attachment with a ".txt" extension.


Re: [PATCH] Fix number of array elements

Posted by Stefan <lu...@posteo.de>.
On 10/12/2016 12:58 PM, Ivan Zhakov wrote:
> On 12 October 2016 at 12:48, Stefan <lu...@gmx.de> wrote:
>> Hi,
>>
>> hope this patch is correct... As far as I  see the number of elements is
>> off by one here:
>>
>> [[[
>> Allocate the correct number of element entries.
>>
>> * subversion/libsvn_client/conflicts.c
>>   (svn_client_conflict_text_get_resolution_options): Correct number of array
>>   entires.
>> ]]]
> I think that log message could be improvement: because this not the
> number of how many entries is allocated. This is initial size of
> array, and apr_array will expand it if needed.
Rephrased:
[[[
Set the initial number of array elements to correspond to the maximum number
we will need.

* subversion/libsvn_client/conflicts.c
  (svn_client_conflict_text_get_resolution_options): Change number of
initial
  array size.
]]]

>
>
> PS: Please submit patches with text/plain mime type as recommended in
> Community Guide [1]
> [1] https://subversion.apache.org/docs/community-guide/general.html#patches-submission
Didn't realize my mail client did send them with the wrong mime-type.
Thanks for pointing that out. Donno how to change that atm, looks like
I've to inline patches directly in the mail from now on.

Regards,
Stefan


Re: [PATCH] Fix number of array elements

Posted by Ivan Zhakov <iv...@visualsvn.com>.
On 12 October 2016 at 12:58, Ivan Zhakov <iv...@visualsvn.com> wrote:
> On 12 October 2016 at 12:48, Stefan <lu...@gmx.de> wrote:
>> Hi,
>>
>> hope this patch is correct... As far as I  see the number of elements is
>> off by one here:
>>
>> [[[
>> Allocate the correct number of element entries.
>>
>> * subversion/libsvn_client/conflicts.c
>>   (svn_client_conflict_text_get_resolution_options): Correct number of array
>>   entires.
>> ]]]
> I think that log message could be improvement: because this not the
> number of how many entries is allocated. This is initial size of
> array, and apr_array will expand it if needed.
>
I've tweaked log message and committed change in r1764439. Thanks.

-- 
Ivan Zhakov

Re: [PATCH] Fix number of array elements

Posted by Ivan Zhakov <iv...@visualsvn.com>.
On 12 October 2016 at 12:48, Stefan <lu...@gmx.de> wrote:
> Hi,
>
> hope this patch is correct... As far as I  see the number of elements is
> off by one here:
>
> [[[
> Allocate the correct number of element entries.
>
> * subversion/libsvn_client/conflicts.c
>   (svn_client_conflict_text_get_resolution_options): Correct number of array
>   entires.
> ]]]
I think that log message could be improvement: because this not the
number of how many entries is allocated. This is initial size of
array, and apr_array will expand it if needed.


PS: Please submit patches with text/plain mime type as recommended in
Community Guide [1]
[1] https://subversion.apache.org/docs/community-guide/general.html#patches-submission


-- 
Ivan Zhakov