=== subversion/include/svn_config.h
==================================================================
--- subversion/include/svn_config.h	(revision 15404)
+++ subversion/include/svn_config.h	(local)
@@ -208,19 +208,30 @@
 typedef svn_boolean_t (*svn_config_section_enumerator_t)
        (const char *name, void *baton);
 
+/** Similar to svn_config_enumerate_sections2(), but uses a memory pool of 
+ * @a cfg instead of one that is explicitely provided.
+ *
+ * @deprecated Provided for backwards compatibility with the 1.2 API. 
+ */
+int svn_config_enumerate_sections (svn_config_t *cfg, 
+                                   svn_config_section_enumerator_t callback,
+                                   void *baton);
+
 /** Enumerate the sections, passing @a baton and the current section's name to
  * @a callback.  Continue the enumeration if @a callback returns @c TRUE.
  * Return the number of times @a callback was called.
  *
- * ### See kff's comment to svn_config_enumerate().  It applies to this
+ * ### See kff's comment to svn_config_enumerate2().  It applies to this
  * function, too. ###
  *
  * @a callback's @a name and @a name parameters are only valid for the
  * duration of the call.
+ *
+ * @since New in 1.3.
  */
-int svn_config_enumerate_sections (svn_config_t *cfg, 
-                                   svn_config_section_enumerator_t callback,
-                                   void *baton);
+int svn_config_enumerate_sections2 (svn_config_t *cfg, 
+                                    svn_config_section_enumerator_t callback,
+                                    void *baton, apr_pool_t *pool);
 
 /** A callback function used in enumerating config options.
  *
@@ -229,6 +240,15 @@
 typedef svn_boolean_t (*svn_config_enumerator_t)
        (const char *name, const char *value, void *baton);
 
+/** Similar to svn_config_enumerate2(), but uses a memory pool of 
+ * @a cfg instead of one that is explicitely provided.
+ *
+ * @deprecated Provided for backwards compatibility with the 1.2 API. 
+ */
+int svn_config_enumerate (svn_config_t *cfg, const char *section,
+                          svn_config_enumerator_t callback, void *baton);
+
+
 /** Enumerate the options in @a section, passing @a baton and the current
  * option's name and value to @a callback.  Continue the enumeration if
  * @a callback returns @c TRUE.  Return the number of times @a callback 
@@ -244,9 +264,12 @@
  *
  * @a callback's @a name and @a value parameters are only valid for the
  * duration of the call.
+ *
+ * @since New in 1.3.
  */
-int svn_config_enumerate (svn_config_t *cfg, const char *section,
-                          svn_config_enumerator_t callback, void *baton);
+int svn_config_enumerate2 (svn_config_t *cfg, const char *section,
+                           svn_config_enumerator_t callback, void *baton,
+                           apr_pool_t *pool);
 
 
 /** Enumerate the group @a master_section in @a cfg.  Each variable
=== subversion/libsvn_subr/config.c
==================================================================
--- subversion/libsvn_subr/config.c	(revision 15404)
+++ subversion/libsvn_subr/config.c	(local)
@@ -662,11 +662,23 @@
                                svn_config_section_enumerator_t callback,
                                void *baton)
 {
+  apr_pool_t *tmp_pool = svn_pool_create (cfg->x_pool);
+  int retval = svn_config_enumerate_sections2 (cfg, callback, baton, tmp_pool);
+  svn_pool_destroy (tmp_pool);
+
+  return retval;
+}
+
+
+int
+svn_config_enumerate_sections2 (svn_config_t *cfg,
+                                svn_config_section_enumerator_t callback,
+                                void *baton, apr_pool_t *pool)
+{
   apr_hash_index_t *sec_ndx;
   int count = 0;
-  apr_pool_t *subpool = svn_pool_create (cfg->x_pool);
 
-  for (sec_ndx = apr_hash_first (subpool, cfg->sections);
+  for (sec_ndx = apr_hash_first (pool, cfg->sections);
        sec_ndx != NULL;
        sec_ndx = apr_hash_next (sec_ndx))
     {
@@ -680,27 +692,26 @@
         break;
     }
 
-  svn_pool_destroy (subpool);
   return count;
 }
 
 
 
 int
-svn_config_enumerate (svn_config_t *cfg, const char *section,
-                      svn_config_enumerator_t callback, void *baton)
+svn_config_enumerate2 (svn_config_t *cfg, const char *section,
+                       svn_config_enumerator_t callback, void *baton,
+                       apr_pool_t *pool)
 {
   cfg_section_t *sec;
   apr_hash_index_t *opt_ndx;
   int count;
-  apr_pool_t *subpool = svn_pool_create (cfg->x_pool);
 
   find_option (cfg, section, NULL, &sec);
   if (sec == NULL)
     return 0;
 
   count = 0;
-  for (opt_ndx = apr_hash_first (subpool, sec->options);
+  for (opt_ndx = apr_hash_first (pool, sec->options);
        opt_ndx != NULL;
        opt_ndx = apr_hash_next (opt_ndx))
     {
@@ -717,11 +728,22 @@
         break;
     }
 
-  svn_pool_destroy (subpool);
   return count;
 }
 
 
+int
+svn_config_enumerate (svn_config_t *cfg, const char *section,
+                      svn_config_enumerator_t callback, void *baton)
+{
+  apr_pool_t *tmp_pool = svn_pool_create (cfg->x_pool);
+  int retval = svn_config_enumerate2 (cfg, section, callback, baton, tmp_pool);
+  svn_pool_destroy (tmp_pool);
+
+  return retval;
+}
+
+
 
 /* Baton for search_groups() */
 struct search_groups_baton
@@ -763,7 +785,7 @@
   gb.key = key;
   gb.match = NULL;
   gb.pool = pool;
-  svn_config_enumerate (cfg, master_section, search_groups, &gb);
+  svn_config_enumerate2 (cfg, master_section, search_groups, &gb, pool);
   return gb.match;
 }
 

