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

revert_tests 15 and 17 fail in svn_ra_local__get_session_url

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2007-11-06 01:01:55 CET

I haven't been running the tests much recently, but revert_tests 15
and 17 have been failing over ra_local for a couple of days at least.
The is_canonical assertion is failing in svn_path_join like this:

(gdb) up
#4 0x00002ae7bcfe56aa in svn_ra_local__get_session_url (session=0x5435b0,
    url=0x7fffeedefbe8, pool=0x5432f8)
    at ../src/subversion/libsvn_ra_local/ra_plugin.c:330
330 *url = svn_path_join(baton->repos_url,
(gdb) list
325 apr_pool_t *pool)
326 {
327 svn_ra_local__session_baton_t *baton = session->priv;
328 const char *fs_path = apr_pstrmemdup(pool, baton->fs_path->data,
329 baton->fs_path->len);
330 *url = svn_path_join(baton->repos_url,
331 svn_path_uri_encode(fs_path + 1, pool),
332 pool);
333 return SVN_NO_ERROR;
334 }
(gdb) p baton->fs_path
$1 = (svn_stringbuf_t *) 0x56b900
(gdb) p baton->fs_path[0]
$2 = {pool = 0x5432f8, data = 0x56b8f8 "", len = 0, blocksize = 1}

Note that baton->fs_path is "" and yet fs_path+1 is being passed to
svn_path_uri_encode, that's obviously wrong. The apr_pstrmemdup call
looks unnecessary as well. Should this be fixed in ra_local or in tha
caller? Are other people seeing these failures?

Index: ../src/subversion/libsvn_ra_local/ra_plugin.c
===================================================================
--- ../src/subversion/libsvn_ra_local/ra_plugin.c (revision 27605)
+++ ../src/subversion/libsvn_ra_local/ra_plugin.c (working copy)
@@ -325,10 +325,11 @@
                               apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *baton = session->priv;
- const char *fs_path = apr_pstrmemdup(pool, baton->fs_path->data,
- baton->fs_path->len);
   *url = svn_path_join(baton->repos_url,
- svn_path_uri_encode(fs_path + 1, pool),
+ svn_path_uri_encode(baton->fs_path->len
+ ? baton->fs_path->data + 1
+ : baton->fs_path->data,
+ pool),
                        pool);
   return SVN_NO_ERROR;
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 6 01:02:12 2007

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.