You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2012/09/12 16:08:57 UTC

svn commit: r1383949 - in /subversion/branches/1.7.x-r1383483: ./ subversion/libsvn_ra/ra_loader.h subversion/libsvn_ra_serf/serf.c

Author: cmpilato
Date: Wed Sep 12 14:08:56 2012
New Revision: 1383949

URL: http://svn.apache.org/viewvc?rev=1383949&view=rev
Log:
On the '1.7.x-r1383483' branch: merge from trunk r1365519.

Modified:
    subversion/branches/1.7.x-r1383483/   (props changed)
    subversion/branches/1.7.x-r1383483/subversion/libsvn_ra/ra_loader.h
    subversion/branches/1.7.x-r1383483/subversion/libsvn_ra_serf/serf.c

Propchange: subversion/branches/1.7.x-r1383483/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1365519

Modified: subversion/branches/1.7.x-r1383483/subversion/libsvn_ra/ra_loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1383483/subversion/libsvn_ra/ra_loader.h?rev=1383949&r1=1383948&r2=1383949&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1383483/subversion/libsvn_ra/ra_loader.h (original)
+++ subversion/branches/1.7.x-r1383483/subversion/libsvn_ra/ra_loader.h Wed Sep 12 14:08:56 2012
@@ -56,7 +56,7 @@ typedef struct svn_ra__vtable_t {
      time this is called.  SESSION->priv may be set by this function. */
   svn_error_t *(*open_session)(svn_ra_session_t *session,
                                const char **corrected_url,
-                               const char *repos_URL,
+                               const char *session_URL,
                                const svn_ra_callbacks2_t *callbacks,
                                void *callback_baton,
                                apr_hash_t *config,

Modified: subversion/branches/1.7.x-r1383483/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1383483/subversion/libsvn_ra_serf/serf.c?rev=1383949&r1=1383948&r2=1383949&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1383483/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/1.7.x-r1383483/subversion/libsvn_ra_serf/serf.c Wed Sep 12 14:08:56 2012
@@ -338,7 +338,7 @@ svn_ra_serf__progress(void *progress_bat
 static svn_error_t *
 svn_ra_serf__open(svn_ra_session_t *session,
                   const char **corrected_url,
-                  const char *repos_URL,
+                  const char *session_URL,
                   const svn_ra_callbacks2_t *callbacks,
                   void *callback_baton,
                   apr_hash_t *config,
@@ -368,12 +368,12 @@ svn_ra_serf__open(svn_ra_session_t *sess
                                        serf_sess->pool));
 
 
-  status = apr_uri_parse(serf_sess->pool, repos_URL, &url);
+  status = apr_uri_parse(serf_sess->pool, session_URL, &url);
   if (status)
     {
       return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
-                               _("Illegal repository URL '%s'"),
-                               repos_URL);
+                               _("Illegal URL '%s'"),
+                               session_URL);
     }
   /* Contrary to what the comment for apr_uri_t.path says in apr-util 1.2.12 and
      older, for root paths url.path will be "", where serf requires "/". */
@@ -384,7 +384,7 @@ svn_ra_serf__open(svn_ra_session_t *sess
       url.port = apr_uri_port_of_scheme(url.scheme);
     }
   serf_sess->session_url = url;
-  serf_sess->session_url_str = apr_pstrdup(serf_sess->pool, repos_URL);
+  serf_sess->session_url_str = apr_pstrdup(serf_sess->pool, session_URL);
   serf_sess->using_ssl = (svn_cstring_casecmp(url.scheme, "https") == 0);
 
   serf_sess->supports_deadprop_count = svn_tristate_unknown;
@@ -470,14 +470,16 @@ svn_ra_serf__reparent(svn_ra_session_t *
             "URL '%s'"), url, session->repos_root_str);
     }
 
-  status = apr_uri_parse(session->pool, url, &new_url);
+  status = apr_uri_parse(pool, url, &new_url);
   if (status)
     {
       return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
                                _("Illegal repository URL '%s'"), url);
     }
 
-  session->session_url.path = new_url.path;
+  /* Maybe we should use a string buffer for these strings so we don't
+     allocate memory in the session on every reparent? */
+  session->session_url.path = apr_pstrdup(session->pool, new_url.path);
   session->session_url_str = apr_pstrdup(session->pool, url);
 
   return SVN_NO_ERROR;