You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Matt Kraai <kr...@alumni.cmu.edu> on 2003/03/10 21:57:54 UTC

RFT: add pool argument to rev_proplist

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

Re: RFT: add pool argument to rev_proplist

Posted by David Summers <da...@summersoft.fay.ar.us>.
On Mon, 10 Mar 2003, Matt Kraai wrote:
> Thanks.  I'm sorry I can't figure out how to do it on my machine.

What kind of box are you using?

If you are using RedHat 7.X or RedHat 8.X then you can use my RPMS.

Othwerwise....I commiserate with you.  :-)

-- 
David Wayne Summers          "Linux: Because reboots are for hardware upgrades!"
david@summersoft.fay.ar.us   PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
PGP Key fingerprint =  C0 E0 4F 50 DD A9 B6 2B  60 A1 31 7E D2 28 6D A8 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: RFT: add pool argument to rev_proplist

Posted by Matt Kraai <kr...@alumni.cmu.edu>.
On Mon, Mar 10, 2003 at 03:59:46PM -0600, cmpilato@collab.net wrote:
> Matt Kraai <kr...@alumni.cmu.edu> writes:
> > Would someone please test the following with ra_dav?
> 
> Alright, I've changed my mind.  I'll test all the RA pool changes over
> RA-DAV if you do the work in one big patch.

Thanks.  I'm sorry I can't figure out how to do it on my machine.

Matt
-- 
Oink!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: RFT: add pool argument to rev_proplist

Posted by Branko Čibej <br...@xbc.nu>.
cmpilato@collab.net wrote:

>Matt Kraai <kr...@alumni.cmu.edu> writes:
>
>  
>
>>Howdy,
>>
>>Would someone please test the following with ra_dav?
>>    
>>
>
>Alright, I've changed my mind.  I'll test all the RA pool changes over
>RA-DAV if you do the work in one big patch.
>  
>

No, man! Just kick him into learning to build apache on his box. :-)

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: RFT: add pool argument to rev_proplist

Posted by cm...@collab.net.
Matt Kraai <kr...@alumni.cmu.edu> writes:

> Howdy,
> 
> Would someone please test the following with ra_dav?

Alright, I've changed my mind.  I'll test all the RA pool changes over
RA-DAV if you do the work in one big patch.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org