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

RFT: add pool argument to change_rev_prop

From: Matt Kraai <kraai_at_alumni.cmu.edu>
Date: 2003-03-10 19:22:01 CET

Howdy,

Would someone please test the following with ra_dav?

Hopefully I'll have Apache installed before too long.

Matt

-- 
Oink!
* subversion/include/svn_ra.h
  (svn_ra_plugin_t): Add pool argument to change_rev_prop.
* subversion/libsvn_ra_dav/ra_dav.h
  (svn_ra_dav__change_rev_prop): Add pool argument.
* subversion/libsvn_ra_dav/fetch.c
  (svn_ra_dav__change_rev_prop): Likewise.
* subversion/libsvn_ra_local/ra_plugin.c
  (svn_ra_local__change_rev_prop): Likewise.
* subversion/libsvn_ra_svn/client.c
  (ra_svn_change_rev_prop): Likewise.
* subversion/libsvn_client/prop_commands.c
  (svn_client_revprop_set): Pass pool to RA->change_rev_prop().
Index: subversion/include/svn_ra.h
===================================================================
--- subversion/include/svn_ra.h	(revision 5259)
+++ subversion/include/svn_ra.h	(working copy)
@@ -298,11 +298,14 @@
    *
    * Set the property @a name to @a value on revision @a rev.
    * Please note that properties attached to revisions are **unversioned**.
+   *
+   * Use @a pool for memory allocation.
    */
   svn_error_t *(*change_rev_prop) (void *session_baton,
                                    svn_revnum_t rev,
                                    const char *name,
-                                   const svn_string_t *value);
+                                   const svn_string_t *value,
+                                   apr_pool_t *pool);
 
   /** Set @a *props to the list of unversioned properties attached to
    * revision @a rev.
Index: subversion/libsvn_ra_local/ra_plugin.c
===================================================================
--- subversion/libsvn_ra_local/ra_plugin.c	(revision 5259)
+++ subversion/libsvn_ra_local/ra_plugin.c	(working copy)
@@ -299,13 +299,14 @@
 svn_ra_local__change_rev_prop (void *session_baton,
                                svn_revnum_t rev,
                                const char *name,
-                               const svn_string_t *value)
+                               const svn_string_t *value,
+                               apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *baton = 
     (svn_ra_local__session_baton_t *) session_baton;
 
   SVN_ERR (svn_repos_fs_change_rev_prop (baton->repos, rev, baton->username,
-                                         name, value, baton->pool));
+                                         name, value, pool));
 
   return SVN_NO_ERROR;
 }
Index: subversion/libsvn_client/prop_commands.c
===================================================================
--- subversion/libsvn_client/prop_commands.c	(revision 5259)
+++ subversion/libsvn_client/prop_commands.c	(working copy)
@@ -165,7 +165,8 @@
            (set_rev, ra_lib, session, revision, NULL, pool));
 
   /* The actual RA call. */
-  SVN_ERR (ra_lib->change_rev_prop (session, *set_rev, propname, propval));
+  SVN_ERR (ra_lib->change_rev_prop (session, *set_rev, propname, propval,
+                                    pool));
 
   return SVN_NO_ERROR;
 }
Index: subversion/libsvn_ra_svn/client.c
===================================================================
--- subversion/libsvn_ra_svn/client.c	(revision 5259)
+++ subversion/libsvn_ra_svn/client.c	(working copy)
@@ -421,10 +421,10 @@
 
 static svn_error_t *ra_svn_change_rev_prop(void *sess, svn_revnum_t rev,
                                            const char *name,
-                                           const svn_string_t *value)
+                                           const svn_string_t *value,
+                                           apr_pool_t *pool)
 {
   svn_ra_svn_conn_t *conn = sess;
-  apr_pool_t *pool = conn->pool;
 
   SVN_ERR(svn_ra_svn_write_cmd(conn, pool, "change-rev-prop", "rcs",
                                rev, name, value));
Index: subversion/libsvn_ra_dav/ra_dav.h
===================================================================
--- subversion/libsvn_ra_dav/ra_dav.h	(revision 5259)
+++ subversion/libsvn_ra_dav/ra_dav.h	(working copy)
@@ -82,7 +82,8 @@
 svn_error_t *svn_ra_dav__change_rev_prop (void *session_baton,
                                           svn_revnum_t rev,
                                           const char *name,
-                                          const svn_string_t *value);
+                                          const svn_string_t *value,
+                                          apr_pool_t *pool);
 
 svn_error_t *svn_ra_dav__rev_proplist (void *session_baton,
                                        svn_revnum_t rev,
Index: subversion/libsvn_ra_dav/fetch.c
===================================================================
--- subversion/libsvn_ra_dav/fetch.c	(revision 5259)
+++ subversion/libsvn_ra_dav/fetch.c	(working copy)
@@ -1503,7 +1503,8 @@
 svn_error_t *svn_ra_dav__change_rev_prop (void *session_baton,
                                           svn_revnum_t rev,
                                           const char *name,
-                                          const svn_string_t *value)
+                                          const svn_string_t *value,
+                                          apr_pool_t *pool)
 {
   const char *val = NULL;
   svn_ra_session_t *ras = session_baton;
@@ -1540,7 +1541,7 @@
                                           ras->url,
                                           rev,
                                           wanted_props, /* DAV:auto-version */
-                                          ras->pool));
+                                          pool));
 
   /* ### TODO: if we got back some value for the baseline's
          'DAV:auto-version' property, interpret it.  We *don't* want
@@ -1558,7 +1559,7 @@
   if (value)
     {
       svn_stringbuf_t *valstr = NULL;
-      svn_xml_escape_cdata_cstring(&valstr, value->data, ras->pool);
+      svn_xml_escape_cdata_cstring(&valstr, value->data, pool);
       val = valstr->data;
     }
 
@@ -1569,7 +1570,7 @@
   rv = ne_proppatch(ras->sess, baseline->url, po);
   if (rv != NE_OK)
     {
-      const char *msg = apr_psprintf(ras->pool,
+      const char *msg = apr_psprintf(pool,
                                      "applying property change to %s",
                                      baseline->url);
       return svn_ra_dav__convert_error(ras->sess, msg, rv);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 10 19:23:05 2003

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.