You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@newton.ch.collab.net> on 2003/03/17 22:34:35 UTC

problem interrupting 'svn log' (may be a Neon issue)

kfogel@tigris.org writes:
> Log:
> Now that we handle sigint, 'svn log' needs to explicitly pay attention
> to cancellation.  This is an addendum to issue #1004.

There's still a problem here, though, a rather mysterious one.

If you type ^C while running 'svn log' on the whole Subversion
repository, the output will now stop immediately.  But your prompt
won't come back immediately -- instead, svn will wait until all the
network data has been received, and *then* give you your prompt back.
(At least, that's what my network activity light seems to be
indicating. :-) )

At first, I thought I knew how to solve this:

   "Aha, I just have to go into the RA layers and make sure that when
    the `log_receiver' func returns SVN_ERR_CANCELLED, the receiver's
    caller stops parsing incoming data and returns the same error
    immediately."

But ra_dav should *already* be doing that.  Specifically, in
libsvn_ra_dav/log.c:log_end_element(), we store the receiver's error
in a baton and then return NE_XML_INVALID.  Since neon/src/ne_xml.h
says this

     NE_XML_INVALID ->
        No, this is NOT valid XML, and parsing should stop.

...I expect libsvn_ra_dav/util.c:svn_ra_dav__parsed_request() to
return immediately.

Admittedly, the full context of that comment is:

   /* Function to check element context... 
      This callback must return:
        NE_XML_VALID ->
           Yes, this is valid XML, and I want to handle this element.
        NE_XML_INVALID ->
           No, this is NOT valid XML, and parsing should stop.
        NE_XML_DECLINE ->
           I don't know anything about this element, someone else
           can handle it.
   */

... and it's not quite clear what function is being referred to.  But
anyway, my understanding of NE_XML_INVALID has always been that it
stops the parsing right away.

However, since ra_dav appears to be eating all the rest of the data
from the server before returning to the client library, I guess
parsing isn't stopping?

I can debug this further, but I'm posting early to see if it rings
bells for anyone...

-Karl


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: problem interrupting 'svn log' (may be a Neon issue)

Posted by Joe Orton <jo...@manyfish.co.uk>.
On Mon, Mar 17, 2003 at 04:34:35PM -0600, Karl Fogel wrote:
> kfogel@tigris.org writes:
> > Log:
> > Now that we handle sigint, 'svn log' needs to explicitly pay attention
> > to cancellation.  This is an addendum to issue #1004.
> 
> There's still a problem here, though, a rather mysterious one.
> 
> If you type ^C while running 'svn log' on the whole Subversion
> repository, the output will now stop immediately.  But your prompt
> won't come back immediately -- instead, svn will wait until all the
> network data has been received, and *then* give you your prompt back.
> (At least, that's what my network activity light seems to be
> indicating. :-) )

Yes, neon still eats the whole response regardless - I'm adding an
interface to abort responses from the callbacks for a future version.
(You can do this already if you use the "caller-pulls" interface for
reading response bodies, but not if you use the callback-based
interface).

Regards,

joe


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org