[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 rev_proplist

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

Howdy,

Would someone please test the following with ra_dav?

Matt

-- 
Oink!
Partially fix issue #1169:
* subversion/include/svn_ra.h
  (svn_ra_plugin_t): Add pool argument to rev_proplist.
* subversion/libsvn_ra_dav/ra_dav.h
  (svn_ra_dav__rev_proplist): Add pool argument.
* subversion/libsvn_ra_dav/fetch.c
  (svn_ra_dav__rev_proplist): Likewise.
* subversion/libsvn_ra_local/ra_plugin.c
  (svn_ra_local__rev_proplist): Likewise.
* subversion/libsvn_ra_svn/client.c
  (ra_svn_rev_proplist): Likewise.
* subversion/libsvn_client/prop_commands.c
  (svn_client_revprop_list): Pass pool to ra->rev_proplist.
Index: subversion/include/svn_ra.h
===================================================================
--- subversion/include/svn_ra.h	(revision 5265)
+++ subversion/include/svn_ra.h	(working copy)
@@ -313,10 +313,13 @@
    * Set @a *props to the list of unversioned properties attached to
    * revision @a rev.  The hash maps (<tt>const char *</tt>) names to
    * (<tt>@c svn_string_t *</tt>) values.
+   *
+   * Use @a pool for memory allocation.
    */
   svn_error_t *(*rev_proplist) (void *session_baton,
                                 svn_revnum_t rev,
-                                apr_hash_t **props);
+                                apr_hash_t **props,
+                                apr_pool_t *pool);
 
   /** Set @a *value to the value of unversioned property @a name attached to
    * revision @a rev.
Index: subversion/libsvn_ra_local/ra_plugin.c
===================================================================
--- subversion/libsvn_ra_local/ra_plugin.c	(revision 5265)
+++ subversion/libsvn_ra_local/ra_plugin.c	(working copy)
@@ -327,12 +327,13 @@
 static svn_error_t *
 svn_ra_local__rev_proplist (void *session_baton,
                             svn_revnum_t rev,
-                            apr_hash_t **props)
+                            apr_hash_t **props,
+                            apr_pool_t *pool)
 {
   svn_ra_local__session_baton_t *baton = 
     (svn_ra_local__session_baton_t *) session_baton;
 
-  SVN_ERR (svn_fs_revision_proplist (props, baton->fs, rev, baton->pool));
+  SVN_ERR (svn_fs_revision_proplist (props, baton->fs, rev, pool));
 
   return SVN_NO_ERROR;
 }
Index: subversion/libsvn_client/prop_commands.c
===================================================================
--- subversion/libsvn_client/prop_commands.c	(revision 5265)
+++ subversion/libsvn_client/prop_commands.c	(working copy)
@@ -970,7 +970,7 @@
            (set_rev, ra_lib, session, revision, NULL, pool));
 
   /* The actual RA call. */
-  SVN_ERR (ra_lib->rev_proplist (session, *set_rev, &proplist));
+  SVN_ERR (ra_lib->rev_proplist (session, *set_rev, &proplist, pool));
 
   for (hi = apr_hash_first (pool, proplist); hi; hi = apr_hash_next (hi))
     {
Index: subversion/libsvn_ra_svn/client.c
===================================================================
--- subversion/libsvn_ra_svn/client.c	(revision 5265)
+++ subversion/libsvn_ra_svn/client.c	(working copy)
@@ -440,10 +440,9 @@
 }
 
 static svn_error_t *ra_svn_rev_proplist(void *sess, svn_revnum_t rev,
-                                        apr_hash_t **props)
+                                        apr_hash_t **props, apr_pool_t *pool)
 {
   svn_ra_svn_conn_t *conn = sess;
-  apr_pool_t *pool = conn->pool;
   apr_array_header_t *proplist;
 
   SVN_ERR(svn_ra_svn_write_cmd(conn, pool, "rev-proplist", "r", rev));
Index: subversion/libsvn_ra_dav/ra_dav.h
===================================================================
--- subversion/libsvn_ra_dav/ra_dav.h	(revision 5265)
+++ subversion/libsvn_ra_dav/ra_dav.h	(working copy)
@@ -87,7 +87,8 @@
 
 svn_error_t *svn_ra_dav__rev_proplist (void *session_baton,
                                        svn_revnum_t rev,
-                                       apr_hash_t **props);
+                                       apr_hash_t **props,
+                                       apr_pool_t *pool);
 
 svn_error_t *svn_ra_dav__rev_prop (void *session_baton,
                                    svn_revnum_t rev,
Index: subversion/libsvn_ra_dav/fetch.c
===================================================================
--- subversion/libsvn_ra_dav/fetch.c	(revision 5265)
+++ subversion/libsvn_ra_dav/fetch.c	(working copy)
@@ -1582,12 +1582,13 @@
 
 svn_error_t *svn_ra_dav__rev_proplist (void *session_baton,
                                        svn_revnum_t rev,
-                                       apr_hash_t **props)
+                                       apr_hash_t **props,
+                                       apr_pool_t *pool)
 {
   svn_ra_session_t *ras = session_baton;
   svn_ra_dav_resource_t *baseline;
 
-  *props = apr_hash_make (ras->pool);
+  *props = apr_hash_make (pool);
 
   /* Main objective: do a PROPFIND (allprops) on a baseline object */  
   SVN_ERR (svn_ra_dav__get_baseline_props(NULL, &baseline,
@@ -1595,13 +1596,13 @@
                                           ras->url,
                                           rev,
                                           NULL, /* get ALL properties */
-                                          ras->pool));
+                                          pool));
 
   /* Build a new property hash, based on the one in the baseline
      resource.  In particular, convert the xml-property-namespaces
      into ones that the client understands.  Strip away the DAV:
      liveprops as well. */
-  SVN_ERR (filter_props (*props, baseline, FALSE, ras->pool));
+  SVN_ERR (filter_props (*props, baseline, FALSE, 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 Mon Mar 10 22:57:55 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.