Yesterday I wrote a patch to make ra_serf support the cancelation
callback I added to the ra layer in r22294, but then discovered that
serf requires apr 1.x to be built. I still use APR 0.9, so:
Could someone test and commit this patch for me please?
What I do to test if it actually works:
- remove the cancelation callback calls from subversion/svn/log-cmd.c
- don't apply the patch and run svn log against the svn repository
(don't forget to --limit 2000 or some other value depending on
connection speed)
- try to Ctrl-C the application
<Now, this should not stop the log from printing>
- Apply the patch
- Rebuild the client
- run the same log command
- try to Ctrl-C again
=> The application should be (almost instantaniously) interrupted
To that extent I'm wondering if this patch is enough: there should
probably be a callback call somewhere which gets triggered when blocks
of data are being received or sent (which is what ra_dav and ra_svn
do).
Log:
[[[
ra_serf support for the r22294 RA cancelation callback.
* subversion/libsvn_ra_serf/util.c
(svn_ra_serf__run_serf_context): Call the callback before blocking.
]]]
Index: subversion/libsvn_ra_serf/util.c
===================================================================
--- subversion/libsvn_ra_serf/util.c (revision 22313)
+++ subversion/libsvn_ra_serf/util.c (working copy)
@@ -193,6 +193,11 @@
{
int i;
+
+ if (sess->wc_callbacks &&
+ sess->wc_callbacks->cancel_func)
+ SVN_ERR((sess->wc_callbacks->cancel_func)(sess->wc_callback_baton));
+
status = serf_context_run(sess->context, SERF_DURATION_FOREVER, pool);
if (APR_STATUS_IS_TIMEUP(status))
{
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 16 15:49:39 2006