Re: svn commit: r1850781 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/blame.c libsvn_client/deprecated.c

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1850781 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/blame.c libsvn_client/deprecated.c

Branko Čibej
On 08.01.2019 19:45, [hidden email] wrote:

> Author: steveking
> Date: Tue Jan  8 18:45:45 2019
> New Revision: 1850781
>
> URL: http://svn.apache.org/viewvc?rev=1850781&view=rev
> Log:
> Extend the blame callback with a string length parameter.
>
> * subversion/incluce/svn_client.h
> * subversion/libsvn_client/blame.c
>   (svn_client_blame_receiver4_t): typedef for new callback
>   (svn_client_blame6): new API using the svn_client_blame_receiver4_t callback
> * subversion/libsvn_client/deprecated.c
>   (svn_client_blame5): moved API there, calling svn_client_blame6 using a
>                        callback shim
>   (blame_wrapper_receiver3): callback shim for svn_client_blame5
>
> Modified:
>     subversion/trunk/subversion/include/svn_client.h
>     subversion/trunk/subversion/libsvn_client/blame.c
>     subversion/trunk/subversion/libsvn_client/deprecated.c
>
> Modified: subversion/trunk/subversion/include/svn_client.h
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1850781&r1=1850780&r2=1850781&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/include/svn_client.h (original)
> +++ subversion/trunk/subversion/include/svn_client.h Tue Jan  8 18:45:45 2019
> @@ -736,10 +736,11 @@ typedef svn_error_t *(*svn_client_get_co
>   * @{
>   */
>  
> -/** Callback type used by svn_client_blame5() to notify the caller
> +/** Callback type used by svn_client_blame6() to notify the caller
>   * that line @a line_no of the blamed file was last changed in @a revision
>   * which has the revision properties @a rev_props, and that the contents were
> - * @a line.
> + * @a line. The @a line content is delivered as is. It is up to the client to
> + * determine the encoding. The line does not contain the cr/lf at the end.

I don't think we even care about CR, only LF.


-- Brane
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1850781 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/blame.c libsvn_client/deprecated.c

Stefan Kueng


On 08.01.2019 19:58, Branko Čibej wrote:

> On 08.01.2019 19:45, [hidden email] wrote:
>> Author: steveking
>> Date: Tue Jan  8 18:45:45 2019
>> New Revision: 1850781
>>
>> URL: http://svn.apache.org/viewvc?rev=1850781&view=rev
>> Log:
>> Extend the blame callback with a string length parameter.
>>
>> * subversion/incluce/svn_client.h
>> * subversion/libsvn_client/blame.c
>>    (svn_client_blame_receiver4_t): typedef for new callback
>>    (svn_client_blame6): new API using the svn_client_blame_receiver4_t callback
>> * subversion/libsvn_client/deprecated.c
>>    (svn_client_blame5): moved API there, calling svn_client_blame6 using a
>>                         callback shim
>>    (blame_wrapper_receiver3): callback shim for svn_client_blame5
>>
>> Modified:
>>      subversion/trunk/subversion/include/svn_client.h
>>      subversion/trunk/subversion/libsvn_client/blame.c
>>      subversion/trunk/subversion/libsvn_client/deprecated.c
>>
>> Modified: subversion/trunk/subversion/include/svn_client.h
>> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1850781&r1=1850780&r2=1850781&view=diff
>> ==============================================================================
>> --- subversion/trunk/subversion/include/svn_client.h (original)
>> +++ subversion/trunk/subversion/include/svn_client.h Tue Jan  8 18:45:45 2019
>> @@ -736,10 +736,11 @@ typedef svn_error_t *(*svn_client_get_co
>>    * @{
>>    */
>>  
>> -/** Callback type used by svn_client_blame5() to notify the caller
>> +/** Callback type used by svn_client_blame6() to notify the caller
>>    * that line @a line_no of the blamed file was last changed in @a revision
>>    * which has the revision properties @a rev_props, and that the contents were
>> - * @a line.
>> + * @a line. The @a line content is delivered as is. It is up to the client to
>> + * determine the encoding. The line does not contain the cr/lf at the end.
>
> I don't think we even care about CR, only LF.

when splitting the line, but I never got a CR either in the callback, so
it is removed.

Stefan

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1850781 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/blame.c libsvn_client/deprecated.c

Michael Pilato
In reply to this post by Branko Čibej
> On 08.01.2019 19:45, [hidden email] wrote:
>> Author: steveking
>> Date: Tue Jan  8 18:45:45 2019
>> New Revision: 1850781

[...]

>> Modified: subversion/trunk/subversion/include/svn_client.h
>> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1850781&r1=1850780&r2=1850781&view=diff
>> ==============================================================================
>> --- subversion/trunk/subversion/include/svn_client.h (original)
>> +++ subversion/trunk/subversion/include/svn_client.h Tue Jan  8 18:45:45 2019
>> @@ -736,10 +736,11 @@ typedef svn_error_t *(*svn_client_get_co
>>    * @{
>>    */
>>
>> -/** Callback type used by svn_client_blame5() to notify the caller
>> +/** Callback type used by svn_client_blame6() to notify the caller
>>    * that line @a line_no of the blamed file was last changed in @a revision
>>    * which has the revision properties @a rev_props, and that the contents were
>> - * @a line.
>> + * @a line. The @a line content is delivered as is. It is up to the client to
>> + * determine the encoding. The line does not contain the cr/lf at the end.

Minor nit: please use all-caps "CR" and "LF" in this context.
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1850781 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/blame.c libsvn_client/deprecated.c

Stefan Kueng


On 08.01.2019 20:30, Michael Pilato wrote:

>> On 08.01.2019 19:45, [hidden email] wrote:
>>> Author: steveking
>>> Date: Tue Jan  8 18:45:45 2019
>>> New Revision: 1850781
>
> [...]
>
>>> Modified: subversion/trunk/subversion/include/svn_client.h
>>> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1850781&r1=1850780&r2=1850781&view=diff
>>> ==============================================================================
>>> --- subversion/trunk/subversion/include/svn_client.h (original)
>>> +++ subversion/trunk/subversion/include/svn_client.h Tue Jan  8 18:45:45 2019
>>> @@ -736,10 +736,11 @@ typedef svn_error_t *(*svn_client_get_co
>>>     * @{
>>>     */
>>>
>>> -/** Callback type used by svn_client_blame5() to notify the caller
>>> +/** Callback type used by svn_client_blame6() to notify the caller
>>>     * that line @a line_no of the blamed file was last changed in @a revision
>>>     * which has the revision properties @a rev_props, and that the contents were
>>> - * @a line.
>>> + * @a line. The @a line content is delivered as is. It is up to the client to
>>> + * determine the encoding. The line does not contain the cr/lf at the end.
>
> Minor nit: please use all-caps "CR" and "LF" in this context.

Done.

Stefan
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1850781 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/blame.c libsvn_client/deprecated.c

Bert Huijben-5
As far as I can tell blame handles all svn:eol-style values, which can be a simple 'CR' in which case the normalized form has a plain '\r'. (Only in case of native and 'LF' the normalized form is a single '\n') Are we sure this case is properly handled now?

(I read a comment that this is just stripped now)

Bert

On Tue, Jan 8, 2019 at 8:41 PM Stefan Kueng <[hidden email]> wrote:


On 08.01.2019 20:30, Michael Pilato wrote:
>> On 08.01.2019 19:45, [hidden email] wrote:
>>> Author: steveking
>>> Date: Tue Jan  8 18:45:45 2019
>>> New Revision: 1850781
>
> [...]
>
>>> Modified: subversion/trunk/subversion/include/svn_client.h
>>> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1850781&r1=1850780&r2=1850781&view=diff
>>> ==============================================================================
>>> --- subversion/trunk/subversion/include/svn_client.h (original)
>>> +++ subversion/trunk/subversion/include/svn_client.h Tue Jan  8 18:45:45 2019
>>> @@ -736,10 +736,11 @@ typedef svn_error_t *(*svn_client_get_co
>>>     * @{
>>>     */
>>>
>>> -/** Callback type used by svn_client_blame5() to notify the caller
>>> +/** Callback type used by svn_client_blame6() to notify the caller
>>>     * that line @a line_no of the blamed file was last changed in @a revision
>>>     * which has the revision properties @a rev_props, and that the contents were
>>> - * @a line.
>>> + * @a line. The @a line content is delivered as is. It is up to the client to
>>> + * determine the encoding. The line does not contain the cr/lf at the end.
>
> Minor nit: please use all-caps "CR" and "LF" in this context.

Done.

Stefan
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1850781 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/blame.c libsvn_client/deprecated.c

Branko Čibej
On Wed, 9 Jan 2019, 10:03 Bert Huijben <[hidden email] wrote:
As far as I can tell blame handles all svn:eol-style values, which can be a simple 'CR' in which case the normalized form has a plain '\r'. (Only in case of native and 'LF' the normalized form is a single '\n') Are we sure this case is properly handled now?

(I read a comment that this is just stripped now)



Our transformation code /should/ only strip away CR when it's immediately followed by LF, which won't affect UTF-16. But that only happens when a file is installed in the working copy. Maybe blame reads files in text mode and the Windows runtime does some magic?

-- Brane



On Tue, Jan 8, 2019 at 8:41 PM Stefan Kueng <[hidden email]> wrote:


On 08.01.2019 20:30, Michael Pilato wrote:
>> On 08.01.2019 19:45, [hidden email] wrote:
>>> Author: steveking
>>> Date: Tue Jan  8 18:45:45 2019
>>> New Revision: 1850781
>
> [...]
>
>>> Modified: subversion/trunk/subversion/include/svn_client.h
>>> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1850781&r1=1850780&r2=1850781&view=diff
>>> ==============================================================================
>>> --- subversion/trunk/subversion/include/svn_client.h (original)
>>> +++ subversion/trunk/subversion/include/svn_client.h Tue Jan  8 18:45:45 2019
>>> @@ -736,10 +736,11 @@ typedef svn_error_t *(*svn_client_get_co
>>>     * @{
>>>     */
>>>
>>> -/** Callback type used by svn_client_blame5() to notify the caller
>>> +/** Callback type used by svn_client_blame6() to notify the caller
>>>     * that line @a line_no of the blamed file was last changed in @a revision
>>>     * which has the revision properties @a rev_props, and that the contents were
>>> - * @a line.
>>> + * @a line. The @a line content is delivered as is. It is up to the client to
>>> + * determine the encoding. The line does not contain the cr/lf at the end.
>
> Minor nit: please use all-caps "CR" and "LF" in this context.

Done.

Stefan