[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1342682 - /subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp

From: Hyrum K Wright <hyrum.wright_at_wandisco.com>
Date: Fri, 25 May 2012 11:43:46 -0500

Thanks for begin willing to work within the guidelines of the project.
 I understand that sometimes they may seem somewhat arbitrary, but
they've grown out of a decade of experience. While they may at first
appear to increase friction, they generally work out to improve the
efficiency of the project as a whole.

As for this particular fix, I'll go ahead and cherrypick merge it back
to trunk. Thanks again for the patches!

-Hyrum

On Fri, May 25, 2012 at 11:39 AM, Vladimir Berezniker
<vmpn_at_hitechman.com> wrote:
> As this change plus another one are beneficial for general JavaHL use, I
> will send them as patches on separate threads.
>
> Thank you for the guidance,
>
> Vladimir
>
>
> On Fri, May 25, 2012 at 12:06 PM, Hyrum K Wright <hyrum.wright_at_wandisco.com>
> wrote:
>>
>> Is this change specific to the branch, or is is beneficial for general
>> JavaHL use?  If the latter, it should be committed to trunk first,
>> then backported to the branch.
>>
>> I realize you don't (yet) have commit privileges to trunk.  The way
>> this would usually work is that you'd post the patch, somebody would
>> either apply it to trunk, or just ask you to apply it, and you'd
>> reference that approval in the commit message.
>>
>> -Hyrum
>>
>> On Fri, May 25, 2012 at 10:19 AM,  <vmpn_at_apache.org> wrote:
>> > Author: vmpn
>> > Date: Fri May 25 15:19:21 2012
>> > New Revision: 1342682
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1342682&view=rev
>> > Log:
>> > JavaHL: Changed return value from the java svn_stream_t read function to
>> > be compatible with the txdelta_next_window function
>> >
>> > [ in subversion/bindings/javahl/native ]
>> >
>> > * InputStream.cpp
>> >  (read): Return 0 instead of -1 as expected by the txdelta_next_window
>> > function
>> >
>> > Modified:
>> >
>> >  subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp
>> >
>> > Modified:
>> > subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp
>> > URL:
>> > http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp?rev=1342682&r1=1342681&r2=1342682&view=diff
>> >
>> > ==============================================================================
>> > ---
>> > subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp
>> > (original)
>> > +++
>> > subversion/branches/javahl-ra/subversion/bindings/javahl/native/InputStream.cpp
>> > Fri May 25 15:19:21 2012
>> > @@ -99,6 +99,14 @@ svn_error_t *InputStream::read(void *bat
>> >   if (JNIUtil::isJavaExceptionThrown())
>> >     return SVN_NO_ERROR;
>> >
>> > +  /*
>> > +   * Convert -1 from InputStream.read that means EOF, 0 which is
>> > subversion equivalent
>> > +   */
>> > +  if(jread == -1)
>> > +    {
>> > +      jread = 0;
>> > +    }
>> > +
>> >   // Put the Java byte array into a helper object to retrieve the
>> >   // data bytes.
>> >   JNIByteArray outdata(data, true);
>> > @@ -107,7 +115,7 @@ svn_error_t *InputStream::read(void *bat
>> >
>> >   // Catch when the Java method tells us it read too much data.
>> >   if (jread > (jint) *len)
>> > -    jread = -1;
>> > +    jread = 0;
>> >
>> >   // In the case of success copy the data back to the Subversion
>> >   // buffer.
>> >
>> >
>>
>>
>>
>> --
>>
>> uberSVN: Apache Subversion Made Easy
>> http://www.uberSVN.com/
>
>

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/
Received on 2012-05-25 18:44:18 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.