[[
Use result_pool/scratch_pool paradigm in libsvn_wc.

* subversion/libsvn_wc/log.h
  subversion/libsvn_wc/log.c
  renamed all pool parameters to result_pool or scratch_pool, or split
  them into result_pool and scratch pool depending on a functions pool
  usage.

* subversion/libsvn_wc/adm_ops.c
  subversion/libsvn_wc/merge.c
  subversion/libsvn_wc/props.c
  subversion/libsvn_wc/update_editor.c
  adjusted all calls to log.h to use two pool parameters.
]]
Index: subversion/libsvn_wc/props.c
===================================================================
--- subversion/libsvn_wc/props.c	(revision 38915)
+++ subversion/libsvn_wc/props.c	(working copy)
@@ -361,11 +361,11 @@
   SVN_ERR(svn_wc__loggy_move(log_accum, adm_access,
                              propfile_tmp_path,
                              propfile_path,
-                             pool));
+                             pool, pool));
 
   /* Make the props file read-only */
   return svn_wc__loggy_set_readonly(log_accum, adm_access,
-                                    propfile_path, pool);
+                                    propfile_path, pool, pool);
 }
 
 svn_error_t *
@@ -403,7 +403,8 @@
                                 kind, svn_wc__props_working, pool));
 
       SVN_ERR(svn_wc__loggy_remove(log_accum, adm_access,
-                                   working_propfile_path, pool));
+                                   working_propfile_path,
+                                   pool, pool));
     }
 
   /* Repeat the above steps for the base properties if required. */
@@ -422,7 +423,8 @@
                                     kind, svn_wc__props_base, pool));
 
           SVN_ERR(svn_wc__loggy_remove(log_accum, adm_access,
-                                       base_propfile_path, pool));
+                                       base_propfile_path,
+                                       pool, pool));
         }
     }
 
@@ -515,7 +517,8 @@
 
   SVN_ERR(svn_wc__entry_versioned(&entry, path, adm_access, TRUE, pool));
   SVN_ERR(svn_wc__prop_path(&props_file, path, entry->kind, props_kind, pool));
-  SVN_ERR(svn_wc__loggy_remove(log_accum, adm_access, props_file, pool));
+  SVN_ERR(svn_wc__loggy_remove(log_accum, adm_access, props_file,
+                               pool, pool));
 
   return SVN_NO_ERROR;
 }
@@ -583,12 +586,13 @@
       if (destroy_baseprops)
         SVN_ERR(svn_wc__loggy_move(log_accum,
                                    adm_access, dst_bprop, dst_rprop,
-                                   pool));
+                                   pool, pool));
       else
         {
           SVN_ERR(svn_io_copy_file(dst_bprop, tmp_rprop, TRUE, pool));
           SVN_ERR(svn_wc__loggy_move(log_accum, adm_access,
-                                     tmp_rprop, dst_rprop, pool));
+                                     tmp_rprop, dst_rprop,
+                                     pool, pool));
         }
     }
   else if (kind == svn_node_none)
@@ -604,7 +608,7 @@
 
       SVN_ERR(svn_wc__loggy_move(log_accum,
                                  adm_access, dst_bprop, dst_rprop,
-                                 pool));
+                                 pool, pool));
     }
 
   return SVN_NO_ERROR;
@@ -629,7 +633,7 @@
                             svn_wc__props_revert, pool));
 
   return svn_wc__loggy_move(log_accum, adm_access,
-                            revert_file, base_file, pool);
+                            revert_file, base_file, pool, pool);
 }
 
 
@@ -1720,7 +1724,7 @@
 
       /* And of course, delete the temporary reject file. */
       SVN_ERR(svn_wc__loggy_remove(entry_accum, adm_access,
-                                   reject_tmp_path, pool));
+                                   reject_tmp_path, pool, pool));
 
       /* Mark entry as "conflicted" with a particular .prej file. */
       {
@@ -1733,7 +1737,7 @@
                                            path,
                                            &entry,
                                            SVN_WC__ENTRY_MODIFY_PREJFILE,
-                                           pool));
+                                           pool, pool));
       }
 
     } /* if (reject_tmp_fp) */
Index: subversion/libsvn_wc/adm_ops.c
===================================================================
--- subversion/libsvn_wc/adm_ops.c	(revision 38915)
+++ subversion/libsvn_wc/adm_ops.c	(working copy)
@@ -242,7 +242,8 @@
   revert_file = svn_wc__text_revert_path(path, pool);
   SVN_ERR(svn_io_check_path(revert_file, &kind, pool));
   if (kind == svn_node_file)
-    SVN_ERR(svn_wc__loggy_remove(logtags, adm_access, revert_file, pool));
+    SVN_ERR(svn_wc__loggy_remove(logtags, adm_access, revert_file,
+                                 pool, pool));
 
   return svn_wc__loggy_props_delete(logtags, path, svn_wc__props_revert,
                                     adm_access, pool);
@@ -463,19 +464,22 @@
 
   if (modify_flags)
     SVN_ERR(svn_wc__loggy_entry_modify(&logtags, adm_access,
-                                       path, &tmp_entry, modify_flags, pool));
+                                       path, &tmp_entry, modify_flags,
+                                       pool, pool));
 
   if (remove_lock)
-    SVN_ERR(svn_wc__loggy_delete_lock(&logtags, adm_access, path, pool));
+    SVN_ERR(svn_wc__loggy_delete_lock(&logtags, adm_access, path,
+                                      pool, pool));
 
   if (remove_changelist)
-    SVN_ERR(svn_wc__loggy_delete_changelist(&logtags, adm_access, path, pool));
+    SVN_ERR(svn_wc__loggy_delete_changelist(&logtags, adm_access, path,
+                                            pool, pool));
 
   /* Regardless of whether it's a file or dir, the "main" logfile
      contains a command to bump the revision attribute (and
      timestamp). */
   SVN_ERR(svn_wc__loggy_committed(&logtags, adm_access,
-                                  path, new_revnum, pool));
+                                  path, new_revnum, pool, pool));
 
 
   /* Do wcprops in the same log txn as revision, etc. */
@@ -491,7 +495,7 @@
                   (&logtags, adm_access,
                    path, prop->name,
                    prop->value ? prop->value->data : NULL,
-                   pool));
+                   pool, pool));
         }
     }
 
@@ -1276,7 +1280,7 @@
       SVN_ERR(svn_wc__loggy_entry_modify(&log_accum, adm_access,
                                          path, &tmp_entry,
                                          SVN_WC__ENTRY_MODIFY_SCHEDULE,
-                                         pool));
+                                         pool, pool));
 
       /* is it a replacement with history? */
       if (was_schedule == svn_wc_schedule_replace && was_copied)
@@ -1290,7 +1294,7 @@
             /* Restore the original text-base */
             SVN_ERR(svn_wc__loggy_move(&log_accum, adm_access,
                                        text_revert, text_base,
-                                       pool));
+                                       pool, pool));
 
           SVN_ERR(svn_wc__loggy_revert_props_restore(&log_accum,
                                                      path, adm_access, pool));
@@ -1559,7 +1563,7 @@
           const char *textb = svn_wc__text_base_path(path, FALSE, pool);
           const char *rtextb = svn_wc__text_revert_path(path, pool);
           SVN_ERR(svn_wc__loggy_move(&log_accum, adm_access,
-                                     textb, rtextb, pool));
+                                     textb, rtextb, pool, pool));
         }
       SVN_ERR(svn_wc__loggy_revert_props_create(&log_accum, path,
                                                 adm_access, TRUE, pool));
@@ -1888,10 +1892,10 @@
         {
           SVN_ERR(svn_wc__loggy_copy(&log_accum, adm_access,
                                      revert_base_path, fullpath,
-                                     pool));
+                                     pool, pool));
           SVN_ERR(svn_wc__loggy_move(&log_accum, adm_access,
                                      revert_base_path, regular_base_path,
-                                     pool));
+                                     pool, pool));
           *reverted = TRUE;
         }
       else
@@ -1909,7 +1913,7 @@
             {
               SVN_ERR(svn_wc__loggy_copy(&log_accum, adm_access,
                                          regular_base_path, fullpath,
-                                         pool));
+                                         pool, pool));
               *reverted = TRUE;
             }
         }
@@ -1924,12 +1928,12 @@
             SVN_ERR(svn_wc__loggy_set_timestamp
                     (&log_accum, adm_access, fullpath,
                      svn_time_to_cstring(entry->cmt_date, pool),
-                     pool));
+                     pool, pool));
 
           SVN_ERR(svn_wc__loggy_set_entry_timestamp_from_wc
-                  (&log_accum, adm_access, fullpath, pool));
+                  (&log_accum, adm_access, fullpath, pool, pool));
           SVN_ERR(svn_wc__loggy_set_entry_working_size_from_wc
-                  (&log_accum, adm_access, fullpath, pool));
+                  (&log_accum, adm_access, fullpath, pool, pool));
         }
     }
 
@@ -1942,7 +1946,7 @@
       SVN_ERR(svn_wc__loggy_remove
               (&log_accum, adm_access,
                svn_dirent_join(svn_wc_adm_access_path(adm_access),
-                               entry->conflict_old, pool), pool));
+                               entry->conflict_old, pool), pool, pool));
     }
   if (entry->conflict_new)
     {
@@ -1951,7 +1955,7 @@
       SVN_ERR(svn_wc__loggy_remove
               (&log_accum, adm_access,
                svn_dirent_join(svn_wc_adm_access_path(adm_access),
-                               entry->conflict_new, pool), pool));
+                               entry->conflict_new, pool), pool, pool));
     }
   if (entry->conflict_wrk)
     {
@@ -1960,7 +1964,7 @@
       SVN_ERR(svn_wc__loggy_remove
               (&log_accum, adm_access,
                svn_dirent_join(svn_wc_adm_access_path(adm_access),
-                               entry->conflict_wrk, pool), pool));
+                               entry->conflict_wrk, pool), pool, pool));
     }
 
   /* Remove the property conflict file if the entry lists one (and it
@@ -1972,7 +1976,7 @@
       SVN_ERR(svn_wc__loggy_remove
               (&log_accum, adm_access,
                svn_dirent_join(svn_wc_adm_access_path(adm_access),
-                               entry->prejfile, pool), pool));
+                               entry->prejfile, pool), pool, pool));
     }
 
   /* Clean up the copied state if this is a replacement. */
@@ -2012,7 +2016,7 @@
 
   /* Modify the entry, loggily. */
   SVN_ERR(svn_wc__loggy_entry_modify(&log_accum, adm_access, fullpath,
-                                     &tmp_entry, flags, pool));
+                                     &tmp_entry, flags, pool, pool));
 
   /* Don't run log if nothing to change. */
   if (! svn_stringbuf_isempty(log_accum))
Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c	(revision 38915)
+++ subversion/libsvn_wc/update_editor.c	(working copy)
@@ -1194,7 +1194,7 @@
       if (! strcmp(prop->name, SVN_PROP_ENTRY_LOCK_TOKEN))
         {
           SVN_ERR(svn_wc__loggy_delete_lock(
-                  &log_accum, adm_access, path, pool));
+                  &log_accum, adm_access, path, pool, pool));
 
           if (lock_state)
             *lock_state = svn_wc_notify_lock_state_unlocked;
@@ -1233,7 +1233,7 @@
 
   if (flags)
     SVN_ERR(svn_wc__loggy_entry_modify(&log_accum, adm_access, path,
-                                       &tmp_entry, flags, pool));
+                                       &tmp_entry, flags, pool, pool));
 
   return SVN_NO_ERROR;
 }
@@ -2121,7 +2121,7 @@
    * delete it from disk if unmodified, but leave any modified files on disk
    * unversioned. */
   SVN_ERR(svn_wc__loggy_delete_entry(&log_item, parent_adm_access, full_path,
-                                     pool));
+                                     pool, pool));
 
   /* If the thing being deleted is the *target* of this update, then
      we need to recreate a 'deleted' entry, so that the parent can give
@@ -2141,7 +2141,7 @@
                                          SVN_WC__ENTRY_MODIFY_REVISION
                                          | SVN_WC__ENTRY_MODIFY_KIND
                                          | SVN_WC__ENTRY_MODIFY_DELETED,
-                                         pool));
+                                         pool, pool));
 
       eb->target_deleted = TRUE;
     }
@@ -4140,7 +4140,7 @@
 
   return svn_wc__loggy_entry_modify(&log_accum, adm_access,
                                     path, &tmp_entry, modify_flags,
-                                    pool);
+                                    pool, pool);
 }
 
 
@@ -4333,7 +4333,7 @@
                text-base. */
             SVN_ERR(svn_wc__loggy_copy(&log_accum, adm_access,
                                        new_text_base_path,
-                                       fb->path, pool));
+                                       fb->path, pool, pool));
         }
       else   /* working file or obstruction is locally modified... */
         {
@@ -4346,7 +4346,7 @@
                  Just copy the new text-base to the file. */
               SVN_ERR(svn_wc__loggy_copy(&log_accum, adm_access,
                                          new_text_base_path,
-                                         fb->path, pool));
+                                         fb->path, pool, pool));
             }
           else if (! fb->existed)
             /* Working file exists and has local mods
@@ -4426,12 +4426,13 @@
               /* If we created a temporary left merge file, get rid of it. */
               if (delete_left)
                 SVN_ERR(svn_wc__loggy_remove(&log_accum, adm_access,
-                                             merge_left, pool));
+                                             merge_left, pool, pool));
 
               /* And clean up add-with-history-related temp file too. */
               if (fb->copied_working_text)
                 SVN_ERR(svn_wc__loggy_remove(&log_accum, adm_access,
-                                             fb->copied_working_text, pool));
+                                             fb->copied_working_text,
+                                             pool, pool));
 
             } /* end: working file exists and has mods */
         } /* end: working file has mods */
@@ -4467,14 +4468,14 @@
              Now, since this is done during the execution of the log file, this
              retranslation is actually done according to the new props. */
           SVN_ERR(svn_wc__loggy_copy(&log_accum, adm_access,
-                                     tmptext, fb->path, pool));
+                                     tmptext, fb->path, pool, pool));
         }
 
       if (*lock_state == svn_wc_notify_lock_state_unlocked)
         /* If a lock was removed and we didn't update the text contents, we
            might need to set the file read-only. */
         SVN_ERR(svn_wc__loggy_maybe_set_readonly(&log_accum, adm_access,
-                                                 fb->path, pool));
+                                                 fb->path, pool, pool));
     }
 
   /* Deal with installation of the new textbase, if appropriate. */
@@ -4482,9 +4483,10 @@
     {
       SVN_ERR(svn_wc__loggy_move(&log_accum,
                                  adm_access, new_text_base_path,
-                                 fb->text_base_path, pool));
+                                 fb->text_base_path, pool, pool));
       SVN_ERR(svn_wc__loggy_set_readonly(&log_accum, adm_access,
-                                         fb->text_base_path, pool));
+                                         fb->text_base_path,
+                                         pool, pool));
       tmp_entry.checksum = svn_checksum_to_cstring(actual_checksum, pool);
       flags |= SVN_WC__ENTRY_MODIFY_CHECKSUM;
     }
@@ -4499,7 +4501,8 @@
 
   /* Do the entry modifications we've accumulated. */
   SVN_ERR(svn_wc__loggy_entry_modify(&log_accum, adm_access,
-                                     fb->path, &tmp_entry, flags, pool));
+                                     fb->path, &tmp_entry, flags,
+                                     pool, pool));
 
   /* Log commands to handle text-timestamp and working-size,
      if the file is - or will be - unmodified and schedule-normal */
@@ -4511,7 +4514,7 @@
       if (fb->last_changed_date && !fb->existed)
         SVN_ERR(svn_wc__loggy_set_timestamp(&log_accum, adm_access,
                                             fb->path, fb->last_changed_date,
-                                            pool));
+                                            pool, pool));
 
       if ((new_text_base_path || magic_props_changed)
           && !fb->deleted)
@@ -4519,18 +4522,20 @@
           /* Adjust entries file to match working file */
           SVN_ERR(svn_wc__loggy_set_entry_timestamp_from_wc(&log_accum,
                                                             adm_access,
-                                                            fb->path, pool));
+                                                            fb->path,
+                                                            pool, pool));
         }
       SVN_ERR(svn_wc__loggy_set_entry_working_size_from_wc(&log_accum,
                                                            adm_access,
-                                                           fb->path, pool));
+                                                           fb->path,
+                                                           pool, pool));
     }
 
   /* Clean up add-with-history temp file. */
   if (fb->copied_text_base)
     SVN_ERR(svn_wc__loggy_remove(&log_accum, adm_access,
                                  fb->copied_text_base,
-                                 pool));
+                                 pool, pool));
 
 
   /* Set the returned content state. */
@@ -5577,7 +5582,7 @@
 
       SVN_ERR(svn_wc__loggy_move(&log_accum,
                                  adm_access, dst_txtb, dst_rtext,
-                                 pool));
+                                 pool, pool));
       SVN_ERR(svn_wc__loggy_revert_props_create(&log_accum,
                                                 dst_path, adm_access,
                                                 TRUE, pool));
@@ -5608,7 +5613,7 @@
 
     SVN_ERR(svn_wc__loggy_entry_modify(&log_accum, adm_access,
                                        dst_path, &tmp_entry,
-                                       modify_flags, pool));
+                                       modify_flags, pool, pool));
   }
 
   /* Set the new revision number and URL in the entry and clean up some other
@@ -5654,12 +5659,12 @@
       /* Translate new temporary text file to working text. */
       SVN_ERR(svn_wc__loggy_copy(&log_accum, adm_access,
                                  tmp_text_path, dst_path,
-                                 pool));
+                                 pool, pool));
 
       /* After copying to the working directory, lose the temp file. */
       SVN_ERR(svn_wc__loggy_remove(&log_accum, adm_access,
                                    tmp_text_path,
-                                   pool));
+                                   pool, pool));
     }
   else
     {
@@ -5667,13 +5672,15 @@
          text base. */
       SVN_ERR(svn_wc__loggy_copy(&log_accum, adm_access,
                                  tmp_text_base_path, dst_path,
-                                 pool));
+                                 pool, pool));
       SVN_ERR(svn_wc__loggy_set_entry_timestamp_from_wc(&log_accum,
                                                         adm_access,
-                                                        dst_path, pool));
+                                                        dst_path,
+                                                        pool, pool));
       SVN_ERR(svn_wc__loggy_set_entry_working_size_from_wc(&log_accum,
                                                            adm_access,
-                                                           dst_path, pool));
+                                                           dst_path,
+                                                           pool, pool));
     }
 
   /* Install new text base. */
@@ -5684,15 +5691,15 @@
        checksum. */
     SVN_ERR(svn_wc__loggy_move(&log_accum,
                                adm_access, tmp_text_base_path,
-                               text_base_path, pool));
+                               text_base_path, pool, pool));
     SVN_ERR(svn_wc__loggy_set_readonly(&log_accum, adm_access,
-                                       text_base_path, pool));
+                                       text_base_path, pool, pool));
 
     tmp_entry.checksum = svn_checksum_to_cstring(base_checksum, pool);
     SVN_ERR(svn_wc__loggy_entry_modify(&log_accum, adm_access,
                                        dst_path, &tmp_entry,
                                        SVN_WC__ENTRY_MODIFY_CHECKSUM,
-                                       pool));
+                                       pool, pool));
   }
 
   /* Write our accumulation of log entries into a log file */
Index: subversion/libsvn_wc/merge.c
===================================================================
--- subversion/libsvn_wc/merge.c	(revision 38915)
+++ subversion/libsvn_wc/merge.c	(working copy)
@@ -411,7 +411,8 @@
                                      svn_io_file_del_none,
                                      pool, pool));
   SVN_ERR(svn_wc__loggy_copy(log_accum, adm_access,
-                             result_target, edited_copy, pool));
+                             result_target, edited_copy,
+                             pool, pool));
   return SVN_NO_ERROR;
 }
 
@@ -446,7 +447,7 @@
         {
           SVN_ERR(svn_wc__loggy_copy(log_accum, adm_access,
                                      left, merge_target,
-                                     pool));
+                                     pool, pool));
           *merge_outcome = svn_wc_merge_merged;
           return SVN_NO_ERROR;
         }
@@ -454,7 +455,7 @@
         {
           SVN_ERR(svn_wc__loggy_copy(log_accum, adm_access,
                                      right, merge_target,
-                                     pool));
+                                     pool, pool));
           *merge_outcome = svn_wc_merge_merged;
           return SVN_NO_ERROR;
         }
@@ -499,7 +500,7 @@
           SVN_ERR(svn_stream_close(chosen_stream));
           SVN_ERR(svn_wc__loggy_copy(log_accum, adm_access,
                                      chosen_path, merge_target,
-                                     pool));
+                                     pool, pool));
           *merge_outcome = svn_wc_merge_merged;
           return SVN_NO_ERROR;
         }
@@ -519,7 +520,7 @@
                                        ? result->merged_file
                                        : result_target,
                                      merge_target,
-                                     pool));
+                                     pool, pool));
           *merge_outcome = svn_wc_merge_merged;
           return SVN_NO_ERROR;
         }
@@ -533,7 +534,7 @@
             {
               SVN_ERR(svn_wc__loggy_copy(log_accum, adm_access,
                                          copyfrom_text, merge_target,
-                                         pool));
+                                         pool, pool));
             }
 
           /* Assume conflict remains. */
@@ -642,11 +643,13 @@
   SVN_ERR(svn_wc__loggy_translated_file(log_accum,
                                         adm_access,
                                         left_copy, tmp_left,
-                                        merge_target, pool));
+                                        merge_target,
+                                        pool, pool));
   SVN_ERR(svn_wc__loggy_translated_file(log_accum,
                                         adm_access,
                                         right_copy, tmp_right,
-                                        merge_target, pool));
+                                        merge_target,
+                                        pool, pool));
 
   /* Back up MERGE_TARGET through detranslation/retranslation:
      the new translation properties may not match the current ones */
@@ -656,7 +659,8 @@
            pool, pool));
   SVN_ERR(svn_wc__loggy_translated_file
           (log_accum, adm_access,
-           target_copy, detranslated_target_copy, merge_target, pool));
+           target_copy, detranslated_target_copy, merge_target,
+           pool, pool));
 
   tmp_entry.conflict_old = svn_dirent_is_child(adm_path, left_copy, pool);
   tmp_entry.conflict_new = svn_dirent_is_child(adm_path, right_copy, pool);
@@ -670,7 +674,7 @@
             SVN_WC__ENTRY_MODIFY_CONFLICT_OLD
               | SVN_WC__ENTRY_MODIFY_CONFLICT_NEW
               | SVN_WC__ENTRY_MODIFY_CONFLICT_WRK,
-            pool));
+            pool, pool));
 
   return SVN_NO_ERROR;
 }
@@ -943,7 +947,7 @@
     SVN_ERR(svn_wc__loggy_copy(log_accum,
                                    adm_access,
                                    result_target, merge_target,
-                                   pool));
+                                   pool, pool));
   return SVN_NO_ERROR;
 }
 
@@ -1006,7 +1010,7 @@
             {
               SVN_ERR(svn_wc__loggy_copy(log_accum, adm_access,
                                          left, merge_target,
-                                         pool));
+                                         pool, pool));
               *merge_outcome = svn_wc_merge_merged;
               return SVN_NO_ERROR;
             }
@@ -1014,7 +1018,7 @@
             {
               SVN_ERR(svn_wc__loggy_copy(log_accum, adm_access,
                                          right, merge_target,
-                                         pool));
+                                         pool, pool));
               *merge_outcome = svn_wc_merge_merged;
               return SVN_NO_ERROR;
             }
@@ -1043,7 +1047,7 @@
                   SVN_ERR(svn_wc__loggy_copy(log_accum, adm_access,
                                              result->merged_file,
                                              merge_target,
-                                             pool));
+                                             pool, pool));
                   *merge_outcome = svn_wc_merge_merged;
                   return SVN_NO_ERROR;
                 }
@@ -1094,7 +1098,7 @@
                                  adm_access,
                                  detranslated_target_abspath,
                                  mine_copy,
-                                 pool));
+                                 pool, pool));
       mine_copy = svn_dirent_is_child(svn_wc_adm_access_path(adm_access),
                                       mine_copy, pool);
       tmp_entry.conflict_wrk = mine_copy;
@@ -1117,7 +1121,7 @@
             SVN_WC__ENTRY_MODIFY_CONFLICT_OLD
               | SVN_WC__ENTRY_MODIFY_CONFLICT_NEW
               | SVN_WC__ENTRY_MODIFY_CONFLICT_WRK,
-            pool));
+            pool, pool));
 
   *merge_outcome = svn_wc_merge_conflict; /* a conflict happened */
 
@@ -1247,9 +1251,11 @@
   if (! dry_run)
     {
       SVN_ERR(svn_wc__loggy_maybe_set_executable(log_accum, adm_access,
-                                                 merge_target, pool));
+                                                 merge_target,
+                                                 pool, pool));
       SVN_ERR(svn_wc__loggy_maybe_set_readonly(log_accum, adm_access,
-                                               merge_target, pool));
+                                               merge_target,
+                                               pool, pool));
     }
 
   return SVN_NO_ERROR;
Index: subversion/libsvn_wc/log.c
===================================================================
--- subversion/libsvn_wc/log.c	(revision 38915)
+++ subversion/libsvn_wc/log.c	(working copy)
@@ -204,28 +204,30 @@
                      const char *versioned,
                      enum svn_wc__xfer_action action,
                      svn_boolean_t rerun,
-                     apr_pool_t *pool)
+                     apr_pool_t *scratch_pool)
 {
   svn_error_t *err;
   const char *full_from_path, *full_dest_path, *full_versioned_path;
   const char *dest_abspath;
   svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
 
-  full_from_path = svn_dirent_join(svn_wc_adm_access_path(adm_access), name,
-                                   pool);
-  full_dest_path = svn_dirent_join(svn_wc_adm_access_path(adm_access), dest,
-                                   pool);
-  SVN_ERR(svn_dirent_get_absolute(&dest_abspath, full_dest_path, pool));
+  full_from_path = svn_dirent_join(svn_wc_adm_access_path(adm_access),
+                                   name, scratch_pool);
+  full_dest_path = svn_dirent_join(svn_wc_adm_access_path(adm_access),
+                                   dest, scratch_pool);
+  SVN_ERR(svn_dirent_get_absolute(&dest_abspath, full_dest_path,
+                                  scratch_pool));
   if (versioned)
     full_versioned_path = svn_dirent_join(svn_wc_adm_access_path(adm_access),
-                                          versioned, pool);
+                                          versioned, scratch_pool);
   else
     full_versioned_path = NULL; /* Silence GCC uninitialised warning */
 
   switch (action)
     {
     case svn_wc__xfer_append:
-      err = svn_io_append_file(full_from_path, full_dest_path, pool);
+      err = svn_io_append_file(full_from_path, full_dest_path,
+                               scratch_pool);
       if (err)
         {
           if (! rerun || ! APR_STATUS_IS_ENOENT(err->apr_err))
@@ -245,17 +247,24 @@
         if (! full_versioned_path)
           full_versioned_path = full_dest_path;
 
-        err = svn_dirent_get_absolute(&versioned_abspath, full_versioned_path,
-                                      pool);
+        err = svn_dirent_get_absolute(&versioned_abspath,
+                                      full_versioned_path,
+                                      scratch_pool);
 
         if (! err)
-          err = svn_wc__get_eol_style(&style, &eol, db, versioned_abspath,
-                                      pool, pool);
+          err = svn_wc__get_eol_style(&style, &eol, db,
+                                      versioned_abspath,
+                                      scratch_pool,
+                                      scratch_pool);
         if (! err)
-          err = svn_wc__get_keywords(&keywords, db, versioned_abspath, NULL,
-                                     pool, pool);
+          err = svn_wc__get_keywords(&keywords, db,
+                                     versioned_abspath, NULL,
+                                    scratch_pool,
+                                    scratch_pool);
         if (! err)
-          err = svn_wc__get_special(&special, db, versioned_abspath, pool);
+          err = svn_wc__get_special(&special, db,
+                                    versioned_abspath,
+                                    scratch_pool);
 
         if (! err)
           err = svn_subst_copy_and_translate3
@@ -263,7 +272,7 @@
                  eol, TRUE,
                  keywords, TRUE,
                  special,
-                 pool);
+                 scratch_pool);
 
         if (err)
           {
@@ -272,15 +281,17 @@
             svn_error_clear(err);
           }
 
-        SVN_ERR(svn_wc__maybe_set_read_only(NULL, db, dest_abspath, pool));
+        SVN_ERR(svn_wc__maybe_set_read_only(NULL, db, dest_abspath,
+                                            scratch_pool));
 
         return svn_error_return(svn_wc__maybe_set_executable(
-                                              NULL, db, dest_abspath, pool));
+                                              NULL, db, dest_abspath,
+                                              scratch_pool));
       }
 
     case svn_wc__xfer_mv:
       err = svn_io_file_rename(full_from_path,
-                               full_dest_path, pool);
+                               full_dest_path, scratch_pool);
 
       /* If we got an ENOENT, that's ok;  the move has probably
          already completed in an earlier run of this log.  */
@@ -314,7 +325,7 @@
  * then set OVERWROTE_WORKING to TRUE.  If the working file isn't
  * touched at all, then set to FALSE.
  *
- * Use POOL for any temporary allocation.
+ * Use SCRATCH_POOL for any temporary allocation.
  */
 static svn_error_t *
 install_committed_file(svn_boolean_t *overwrote_working,
@@ -322,7 +333,7 @@
                        const char *name,
                        svn_boolean_t remove_executable,
                        svn_boolean_t remove_read_only,
-                       apr_pool_t *pool)
+                       apr_pool_t *scratch_pool)
 {
   const char *filepath;
   const char *tmp_text_base;
@@ -336,8 +347,10 @@
   /* start off assuming that the working file isn't touched. */
   *overwrote_working = FALSE;
 
-  filepath = svn_dirent_join(svn_wc_adm_access_path(adm_access), name, pool);
-  SVN_ERR(svn_dirent_get_absolute(&file_abspath, filepath, pool));
+  filepath = svn_dirent_join(svn_wc_adm_access_path(adm_access), name,
+                             scratch_pool);
+  SVN_ERR(svn_dirent_get_absolute(&file_abspath, filepath,
+                                  scratch_pool));
 
   /* In the commit, newlines and keywords may have been
    * canonicalized and/or contracted... Or they may not have
@@ -357,8 +370,8 @@
    */
 
   /* Is there a tmp_text_base that needs to be installed?  */
-  tmp_text_base = svn_wc__text_base_path(filepath, 1, pool);
-  SVN_ERR(svn_io_check_path(tmp_text_base, &kind, pool));
+  tmp_text_base = svn_wc__text_base_path(filepath, 1, scratch_pool);
+  SVN_ERR(svn_io_check_path(tmp_text_base, &kind, scratch_pool));
 
   {
     const char *tmp = (kind == svn_node_file) ? tmp_text_base : filepath;
@@ -366,7 +379,8 @@
     SVN_ERR(svn_wc__internal_translated_file(&tmp_wfile, tmp, db,
                                              file_abspath,
                                              SVN_WC_TRANSLATE_FROM_NF,
-                                             pool, pool));
+                                             scratch_pool,
+                                             scratch_pool));
 
     /* If the translation is a no-op, the text base and the working copy
      * file contain the same content, because we use the same props here
@@ -376,17 +390,18 @@
      * it has the right executable and read_write attributes set.
      */
 
-    SVN_ERR(svn_wc__get_special(&special, db, file_abspath, pool));
+    SVN_ERR(svn_wc__get_special(&special, db, file_abspath,
+                                scratch_pool));
     if (! special && tmp != tmp_wfile)
       SVN_ERR(svn_io_files_contents_same_p(&same, tmp_wfile,
-                                           filepath, pool));
+                                           filepath, scratch_pool));
     else
       same = TRUE;
   }
 
   if (! same)
     {
-      SVN_ERR(svn_io_file_rename(tmp_wfile, filepath, pool));
+      SVN_ERR(svn_io_file_rename(tmp_wfile, filepath, scratch_pool));
       *overwrote_working = TRUE;
     }
 
@@ -396,13 +411,14 @@
       if (same)
         SVN_ERR(svn_io_set_file_executable(filepath,
                                            FALSE, /* chmod -x */
-                                           FALSE, pool));
+                                           FALSE, scratch_pool));
       *overwrote_working = TRUE; /* entry needs wc-file's timestamp  */
     }
   else
     {
       /* Set the working file's execute bit if props dictate. */
-      SVN_ERR(svn_wc__maybe_set_executable(&did_set, db, file_abspath, pool));
+      SVN_ERR(svn_wc__maybe_set_executable(&did_set, db, file_abspath,
+                                           scratch_pool));
       if (did_set)
         /* okay, so we didn't -overwrite- the working file, but we changed
            its timestamp, which is the point of returning this flag. :-) */
@@ -413,12 +429,14 @@
     {
       /* No need to make a new file read_write: new files already are. */
       if (same)
-        SVN_ERR(svn_io_set_file_read_write(filepath, FALSE, pool));
+        SVN_ERR(svn_io_set_file_read_write(filepath, FALSE,
+                                           scratch_pool));
       *overwrote_working = TRUE; /* entry needs wc-file's timestamp  */
     }
   else
     {
-      SVN_ERR(svn_wc__maybe_set_read_only(&did_set, db, file_abspath, pool));
+      SVN_ERR(svn_wc__maybe_set_read_only(&did_set, db, file_abspath,
+                                          scratch_pool));
       if (did_set)
         /* okay, so we didn't -overwrite- the working file, but we changed
            its timestamp, which is the point of returning this flag. :-) */
@@ -427,7 +445,7 @@
 
   /* Install the new text base if one is waiting. */
   if (kind == svn_node_file)  /* tmp_text_base exists */
-    SVN_ERR(svn_wc__sync_text_base(filepath, pool));
+    SVN_ERR(svn_wc__sync_text_base(filepath, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -1480,14 +1498,14 @@
               svn_boolean_t adm_only,
               svn_cancel_func_t cancel_func,
               void *cancel_baton,
-              apr_pool_t *pool)
+              apr_pool_t *scratch_pool)
 {
   const svn_wc_entry_t *thisdir_entry, *parent_entry;
   svn_wc_entry_t tmp_entry;
   svn_error_t *err;
   SVN_ERR(svn_wc_entry(&thisdir_entry,
                        svn_wc_adm_access_path(adm_access), adm_access,
-                       FALSE, pool));
+                       FALSE, scratch_pool));
 
   /* Blow away the administrative directories, and possibly the working
      copy tree too. */
@@ -1496,7 +1514,7 @@
                                             !adm_only, /* destroy */
                                             FALSE, /* no instant err */
                                             cancel_func, cancel_baton,
-                                            pool);
+                                            scratch_pool);
   if (err && err->apr_err != SVN_ERR_WC_LEFT_LOCAL_MOD)
     return err;
   svn_error_clear(err);
@@ -1508,9 +1526,11 @@
     svn_wc_adm_access_t *parent_access;
 
     svn_dirent_split(svn_wc_adm_access_path(adm_access), &parent, &bname,
-                     pool);
-    SVN_ERR(svn_wc_adm_retrieve(&parent_access, adm_access, parent, pool));
-    SVN_ERR(svn_wc_entry(&parent_entry, parent, parent_access, FALSE, pool));
+                     scratch_pool);
+    SVN_ERR(svn_wc_adm_retrieve(&parent_access, adm_access, parent,
+                                scratch_pool));
+    SVN_ERR(svn_wc_entry(&parent_entry, parent, parent_access, FALSE,
+                         scratch_pool));
 
     if (thisdir_entry->revision > parent_entry->revision)
       {
@@ -1521,7 +1541,7 @@
                                      SVN_WC__ENTRY_MODIFY_REVISION
                                      | SVN_WC__ENTRY_MODIFY_KIND
                                      | SVN_WC__ENTRY_MODIFY_DELETED,
-                                     pool));
+                                     scratch_pool));
       }
   }
   return SVN_NO_ERROR;
@@ -1538,11 +1558,11 @@
    number appended to SVN_WC__ADM_LOG so that they look like "log.1",
    "log.2", etc. */
 static const char *
-compute_logfile_path(int log_number, apr_pool_t *pool)
+compute_logfile_path(int log_number, apr_pool_t *result_pool)
 {
   if (log_number == 0)
     return SVN_WC__ADM_LOG;
-  return apr_psprintf(pool, SVN_WC__ADM_LOG ".%d", log_number);
+  return apr_psprintf(result_pool, SVN_WC__ADM_LOG ".%d", log_number);
 }
 
 
@@ -1550,39 +1570,40 @@
 static svn_error_t *
 run_log(svn_wc_adm_access_t *adm_access,
         svn_boolean_t rerun,
-        apr_pool_t *pool)
+        apr_pool_t *scratch_pool)
 {
   const char *dir_abspath = svn_wc__adm_access_abspath(adm_access);
   svn_xml_parser_t *parser;
   struct log_runner *loggy;
-  char *buf = apr_palloc(pool, SVN__STREAM_CHUNK_SIZE);
+  char *buf = apr_palloc(scratch_pool, SVN__STREAM_CHUNK_SIZE);
   const char *logfile_path;
   int log_number;
-  apr_pool_t *iterpool = svn_pool_create(pool);
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   svn_boolean_t killme, kill_adm_only;
   const svn_wc_entry_t *entry;
 
-  loggy = apr_pcalloc(pool, sizeof(*loggy));
+  loggy = apr_pcalloc(scratch_pool, sizeof(*loggy));
 
-  parser = svn_xml_make_parser(loggy, start_handler, NULL, NULL, pool);
+  parser = svn_xml_make_parser(loggy, start_handler, NULL, NULL,
+                               scratch_pool);
 
   loggy->db = svn_wc__adm_get_db(adm_access);
   loggy->dir_abspath = svn_wc__adm_access_abspath(adm_access);
   loggy->adm_access = adm_access;
-  loggy->pool = svn_pool_create(pool);
-  loggy->result_pool = svn_pool_create(pool);
+  loggy->pool = svn_pool_create(scratch_pool);
+  loggy->result_pool = svn_pool_create(scratch_pool);
   loggy->parser = parser;
   loggy->rerun = rerun;
   loggy->count = 0;
   loggy->tree_conflicts_added = FALSE;
 
   /* Populate the tree conflict array with the existing tree conflicts. */
-  SVN_ERR(svn_wc_entry(&entry, svn_wc_adm_access_path(adm_access), adm_access,
-                       TRUE, pool));
+  SVN_ERR(svn_wc_entry(&entry, svn_wc_adm_access_path(adm_access),
+                       adm_access, TRUE, scratch_pool));
   SVN_ERR(svn_wc__read_tree_conflicts(&(loggy->tree_conflicts),
                                       entry->tree_conflict_data,
                                       svn_wc_adm_access_path(adm_access),
-                                      pool));
+                                      scratch_pool));
 
   /* Expat wants everything wrapped in a top-level form, so start with
      a ghost open tag. */
@@ -1634,12 +1655,13 @@
       svn_error_t *err;
 
       SVN_ERR(svn_wc__write_tree_conflicts(&tmp_entry.tree_conflict_data,
-                                           loggy->tree_conflicts, pool));
+                                           loggy->tree_conflicts,
+                                           scratch_pool));
 
       err = svn_wc__entry_modify(adm_access, SVN_WC_ENTRY_THIS_DIR,
                                  &tmp_entry,
                                  SVN_WC__ENTRY_MODIFY_TREE_CONFLICT_DATA,
-                                 pool);
+                                 scratch_pool);
       if (err)
         return svn_error_createf(pick_error_code(loggy), err,
                                  _("Error recording tree conflicts in '%s'"),
@@ -1647,10 +1669,12 @@
     }
 
   /* Check for a 'killme' file in the administrative area. */
-  SVN_ERR(svn_wc__check_killme(adm_access, &killme, &kill_adm_only, pool));
+  SVN_ERR(svn_wc__check_killme(adm_access, &killme, &kill_adm_only,
+                               scratch_pool));
   if (killme)
     {
-      SVN_ERR(handle_killme(adm_access, kill_adm_only, NULL, NULL, pool));
+      SVN_ERR(handle_killme(adm_access, kill_adm_only, NULL, NULL,
+                            scratch_pool));
     }
   else
     {
@@ -1674,9 +1698,9 @@
 svn_error_t *
 svn_wc__run_log(svn_wc_adm_access_t *adm_access,
                 const char *diff3_cmd,  /* ### OBSOLETE  */
-                apr_pool_t *pool)
+                apr_pool_t *scratch_pool)
 {
-  return run_log(adm_access, FALSE, pool);
+  return run_log(adm_access, FALSE, scratch_pool);
 }
 
 
@@ -1693,18 +1717,19 @@
                          svn_boolean_t is_move,
                          svn_wc_adm_access_t *adm_access,
                          const char *src_path, const char *dst_path,
-                         apr_pool_t *pool)
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool)
 {
   svn_node_kind_t kind;
   const char *full_src = svn_dirent_join(svn_wc_adm_access_path(adm_access),
-                                         src_path, pool);
+                                         src_path, scratch_pool);
 
-  SVN_ERR(svn_io_check_path(full_src, &kind, pool));
+  SVN_ERR(svn_io_check_path(full_src, &kind, scratch_pool));
 
   /* Does this file exist? */
   if (kind != svn_node_none)
     {
-      svn_xml_make_open_tag(log_accum, pool,
+      svn_xml_make_open_tag(log_accum, result_pool,
                             svn_xml_self_closing,
                             is_move
                               ? SVN_WC__LOG_MV
@@ -1729,12 +1754,12 @@
 loggy_path(const char **logy_path,
            const char *path,
            svn_wc_adm_access_t *adm_access,
-           apr_pool_t *pool)
+           apr_pool_t *scratch_pool)
 {
   const char *abspath;
   const char *adm_abspath = svn_wc__adm_access_abspath(adm_access);
 
-  SVN_ERR(svn_dirent_get_absolute(&abspath, path, pool));
+  SVN_ERR(svn_dirent_get_absolute(&abspath, path, scratch_pool));
   *logy_path = svn_dirent_is_child(adm_abspath, abspath, NULL);
 
   if (! (*logy_path) && strcmp(abspath, adm_abspath) == 0)
@@ -1768,16 +1793,17 @@
 svn_wc__loggy_committed(svn_stringbuf_t **log_accum,
                         svn_wc_adm_access_t *adm_access,
                         const char *path, svn_revnum_t revnum,
-                        apr_pool_t *pool)
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
-  svn_xml_make_open_tag(log_accum, pool, svn_xml_self_closing,
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
+  svn_xml_make_open_tag(log_accum, result_pool, svn_xml_self_closing,
                         SVN_WC__LOG_COMMITTED,
                         SVN_WC__LOG_ATTR_NAME, loggy_path1,
                         SVN_WC__LOG_ATTR_REVISION,
-                        apr_psprintf(pool, "%ld", revnum),
+                        apr_psprintf(scratch_pool, "%ld", revnum),
                         NULL);
 
   return SVN_NO_ERROR;
@@ -1787,15 +1813,17 @@
 svn_wc__loggy_copy(svn_stringbuf_t **log_accum,
                    svn_wc_adm_access_t *adm_access,
                    const char *src_path, const char *dst_path,
-                   apr_pool_t *pool)
+                   apr_pool_t *result_pool,
+                   apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
   const char *loggy_path2;
 
-  SVN_ERR(loggy_path(&loggy_path1, src_path, adm_access, pool));
-  SVN_ERR(loggy_path(&loggy_path2, dst_path, adm_access, pool));
+  SVN_ERR(loggy_path(&loggy_path1, src_path, adm_access, scratch_pool));
+  SVN_ERR(loggy_path(&loggy_path2, dst_path, adm_access, scratch_pool));
   return loggy_move_copy_internal(log_accum, FALSE, adm_access,
-                                  loggy_path1, loggy_path2, pool);
+                                  loggy_path1, loggy_path2,
+                                  result_pool, scratch_pool);
 }
 
 svn_error_t *
@@ -1804,17 +1832,18 @@
                               const char *dst,
                               const char *src,
                               const char *versioned,
-                              apr_pool_t *pool)
+                              apr_pool_t *result_pool,
+                              apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
   const char *loggy_path2;
   const char *loggy_path3;
 
-  SVN_ERR(loggy_path(&loggy_path1, src, adm_access, pool));
-  SVN_ERR(loggy_path(&loggy_path2, dst, adm_access, pool));
-  SVN_ERR(loggy_path(&loggy_path3, versioned, adm_access, pool));
+  SVN_ERR(loggy_path(&loggy_path1, src, adm_access, scratch_pool));
+  SVN_ERR(loggy_path(&loggy_path2, dst, adm_access, scratch_pool));
+  SVN_ERR(loggy_path(&loggy_path3, versioned, adm_access, scratch_pool));
   svn_xml_make_open_tag
-    (log_accum, pool, svn_xml_self_closing,
+    (log_accum, result_pool, svn_xml_self_closing,
      SVN_WC__LOG_CP_AND_TRANSLATE,
      SVN_WC__LOG_ATTR_NAME, loggy_path1,
      SVN_WC__LOG_ATTR_DEST, loggy_path2,
@@ -1828,12 +1857,13 @@
 svn_wc__loggy_delete_entry(svn_stringbuf_t **log_accum,
                            svn_wc_adm_access_t *adm_access,
                            const char *path,
-                           apr_pool_t *pool)
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
-  svn_xml_make_open_tag(log_accum, pool, svn_xml_self_closing,
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
+  svn_xml_make_open_tag(log_accum, result_pool, svn_xml_self_closing,
                         SVN_WC__LOG_DELETE_ENTRY,
                         SVN_WC__LOG_ATTR_NAME, loggy_path1,
                         NULL);
@@ -1845,12 +1875,13 @@
 svn_wc__loggy_delete_lock(svn_stringbuf_t **log_accum,
                           svn_wc_adm_access_t *adm_access,
                           const char *path,
-                          apr_pool_t *pool)
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
-  svn_xml_make_open_tag(log_accum, pool, svn_xml_self_closing,
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
+  svn_xml_make_open_tag(log_accum, result_pool, svn_xml_self_closing,
                         SVN_WC__LOG_DELETE_LOCK,
                         SVN_WC__LOG_ATTR_NAME, loggy_path1,
                         NULL);
@@ -1862,12 +1893,13 @@
 svn_wc__loggy_delete_changelist(svn_stringbuf_t **log_accum,
                                 svn_wc_adm_access_t *adm_access,
                                 const char *path,
-                                apr_pool_t *pool)
+                                apr_pool_t *result_pool,
+                                apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
-  svn_xml_make_open_tag(log_accum, pool, svn_xml_self_closing,
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
+  svn_xml_make_open_tag(log_accum, result_pool, svn_xml_self_closing,
                         SVN_WC__LOG_DELETE_CHANGELIST,
                         SVN_WC__LOG_ATTR_NAME, loggy_path1,
                         NULL);
@@ -1881,10 +1913,11 @@
                            const char *path,
                            const svn_wc_entry_t *entry,
                            apr_uint64_t modify_flags,
-                           apr_pool_t *pool)
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
-  apr_hash_t *prop_hash = apr_hash_make(pool);
+  apr_hash_t *prop_hash = apr_hash_make(scratch_pool);
   static const char *kind_str[] =
     { "none",
       SVN_WC__ENTRIES_ATTR_FILE_STR,
@@ -1909,7 +1942,7 @@
 
   ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_REVISION,
                  SVN_WC__ENTRY_ATTR_REVISION,
-                 apr_psprintf(pool, "%ld", entry->revision));
+                 apr_psprintf(scratch_pool, "%ld", entry->revision));
 
   ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_URL,
                  SVN_WC__ENTRY_ATTR_URL,
@@ -1953,7 +1986,7 @@
 
   ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_COPYFROM_REV,
                  SVN_WC__ENTRY_ATTR_COPYFROM_REV,
-                 apr_psprintf(pool, "%ld", entry->copyfrom_rev));
+                 apr_psprintf(scratch_pool, "%ld", entry->copyfrom_rev));
 
   ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_CONFLICT_OLD,
                  SVN_WC__ENTRY_ATTR_CONFLICT_OLD,
@@ -1973,7 +2006,7 @@
 
   ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_TEXT_TIME,
                  SVN_WC__ENTRY_ATTR_TEXT_TIME,
-                 svn_time_to_cstring(entry->text_time, pool));
+                 svn_time_to_cstring(entry->text_time, scratch_pool));
 
   ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_CHECKSUM,
                  SVN_WC__ENTRY_ATTR_CHECKSUM,
@@ -1981,11 +2014,11 @@
 
   ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_CMT_REV,
                  SVN_WC__ENTRY_ATTR_CMT_REV,
-                 apr_psprintf(pool, "%ld", entry->cmt_rev));
+                 apr_psprintf(scratch_pool, "%ld", entry->cmt_rev));
 
   ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_CMT_DATE,
                  SVN_WC__ENTRY_ATTR_CMT_DATE,
-                 svn_time_to_cstring(entry->cmt_date, pool));
+                 svn_time_to_cstring(entry->cmt_date, scratch_pool));
 
   ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_CMT_AUTHOR,
                  SVN_WC__ENTRY_ATTR_CMT_AUTHOR,
@@ -1998,7 +2031,7 @@
 
   ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_WORKING_SIZE,
                  SVN_WC__ENTRY_ATTR_WORKING_SIZE,
-                 apr_psprintf(pool, "%" APR_OFF_T_FMT,
+                 apr_psprintf(scratch_pool, "%" APR_OFF_T_FMT,
                               entry->working_size));
 
   ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_FORCE,
@@ -2014,11 +2047,11 @@
   if (apr_hash_count(prop_hash) == 0)
     return SVN_NO_ERROR;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
   apr_hash_set(prop_hash, SVN_WC__LOG_ATTR_NAME,
                APR_HASH_KEY_STRING, loggy_path1);
 
-  svn_xml_make_open_tag_hash(log_accum, pool,
+  svn_xml_make_open_tag_hash(log_accum, result_pool,
                              svn_xml_self_closing,
                              SVN_WC__LOG_MODIFY_ENTRY,
                              prop_hash);
@@ -2033,12 +2066,13 @@
                             const char *path,
                             const char *propname,
                             const char *propval,
-                            apr_pool_t *pool)
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
-  svn_xml_make_open_tag(log_accum, pool, svn_xml_self_closing,
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
+  svn_xml_make_open_tag(log_accum, result_pool, svn_xml_self_closing,
                         SVN_WC__LOG_MODIFY_WCPROP,
                         SVN_WC__LOG_ATTR_NAME, loggy_path1,
                         SVN_WC__LOG_ATTR_PROPNAME, propname,
@@ -2052,28 +2086,31 @@
 svn_wc__loggy_move(svn_stringbuf_t **log_accum,
                    svn_wc_adm_access_t *adm_access,
                    const char *src_path, const char *dst_path,
-                   apr_pool_t *pool)
+                   apr_pool_t *result_pool,
+                   apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
   const char *loggy_path2;
 
-  SVN_ERR(loggy_path(&loggy_path1, src_path, adm_access, pool));
-  SVN_ERR(loggy_path(&loggy_path2, dst_path, adm_access, pool));
+  SVN_ERR(loggy_path(&loggy_path1, src_path, adm_access, scratch_pool));
+  SVN_ERR(loggy_path(&loggy_path2, dst_path, adm_access, scratch_pool));
   return loggy_move_copy_internal(log_accum, TRUE, adm_access,
-                                  loggy_path1, loggy_path2, pool);
+                                  loggy_path1, loggy_path2,
+                                  result_pool, scratch_pool);
 }
 
 svn_error_t *
 svn_wc__loggy_maybe_set_executable(svn_stringbuf_t **log_accum,
                                    svn_wc_adm_access_t *adm_access,
                                    const char *path,
-                                   apr_pool_t *pool)
+                                   apr_pool_t *result_pool,
+                                   apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
   svn_xml_make_open_tag(log_accum,
-                        pool,
+                        result_pool,
                         svn_xml_self_closing,
                         SVN_WC__LOG_MAYBE_EXECUTABLE,
                         SVN_WC__LOG_ATTR_NAME, loggy_path1,
@@ -2086,13 +2123,14 @@
 svn_wc__loggy_maybe_set_readonly(svn_stringbuf_t **log_accum,
                                  svn_wc_adm_access_t *adm_access,
                                  const char *path,
-                                 apr_pool_t *pool)
+                                 apr_pool_t *result_pool,
+                                 apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
   svn_xml_make_open_tag(log_accum,
-                        pool,
+                        result_pool,
                         svn_xml_self_closing,
                         SVN_WC__LOG_MAYBE_READONLY,
                         SVN_WC__LOG_ATTR_NAME,
@@ -2106,13 +2144,14 @@
 svn_wc__loggy_set_entry_timestamp_from_wc(svn_stringbuf_t **log_accum,
                                           svn_wc_adm_access_t *adm_access,
                                           const char *path,
-                                          apr_pool_t *pool)
+                                          apr_pool_t *result_pool,
+                                          apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
   svn_xml_make_open_tag(log_accum,
-                        pool,
+                        result_pool,
                         svn_xml_self_closing,
                         SVN_WC__LOG_MODIFY_ENTRY,
                         SVN_WC__LOG_ATTR_NAME,
@@ -2128,13 +2167,14 @@
 svn_wc__loggy_set_entry_working_size_from_wc(svn_stringbuf_t **log_accum,
                                                 svn_wc_adm_access_t *adm_access,
                                                 const char *path,
-                                                apr_pool_t *pool)
+                                                apr_pool_t *result_pool,
+                                                apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
   svn_xml_make_open_tag(log_accum,
-                        pool,
+                        result_pool,
                         svn_xml_self_closing,
                         SVN_WC__LOG_MODIFY_ENTRY,
                         SVN_WC__LOG_ATTR_NAME,
@@ -2150,13 +2190,14 @@
 svn_wc__loggy_set_readonly(svn_stringbuf_t **log_accum,
                            svn_wc_adm_access_t *adm_access,
                            const char *path,
-                           apr_pool_t *pool)
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
   svn_xml_make_open_tag(log_accum,
-                        pool,
+                        result_pool,
                         svn_xml_self_closing,
                         SVN_WC__LOG_READONLY,
                         SVN_WC__LOG_ATTR_NAME,
@@ -2171,13 +2212,14 @@
                             svn_wc_adm_access_t *adm_access,
                             const char *path,
                             const char *timestr,
-                            apr_pool_t *pool)
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
   svn_xml_make_open_tag(log_accum,
-                        pool,
+                        result_pool,
                         svn_xml_self_closing,
                         SVN_WC__LOG_SET_TIMESTAMP,
                         SVN_WC__LOG_ATTR_NAME,
@@ -2193,14 +2235,15 @@
 svn_wc__loggy_remove(svn_stringbuf_t **log_accum,
                      svn_wc_adm_access_t *adm_access,
                      const char *path,
-                     apr_pool_t *pool)
+                     apr_pool_t *result_pool,
+                     apr_pool_t *scratch_pool)
 {
   const char *loggy_path1;
 
-  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, pool));
+  SVN_ERR(loggy_path(&loggy_path1, path, adm_access, scratch_pool));
   /* No need to check whether BASE_NAME exists: ENOENT is ignored
      by the log-runner */
-  svn_xml_make_open_tag(log_accum, pool,
+  svn_xml_make_open_tag(log_accum, result_pool,
                         svn_xml_self_closing,
                         SVN_WC__LOG_RM,
                         SVN_WC__LOG_ATTR_NAME,
@@ -2243,23 +2286,26 @@
 svn_error_t *
 svn_wc__write_log(svn_wc_adm_access_t *adm_access,
                   int log_number, svn_stringbuf_t *log_content,
-                  apr_pool_t *pool)
+                  apr_pool_t *scratch_pool)
 {
   svn_stream_t *stream;
   const char *temp_file_path;
-  const char *logfile_name = compute_logfile_path(log_number, pool);
+  const char *logfile_name = compute_logfile_path(log_number,
+                                                  scratch_pool);
   const char *adm_path = svn_wc_adm_access_path(adm_access);
   apr_size_t len = log_content->len;
 
   SVN_ERR(svn_wc__open_adm_writable(&stream, &temp_file_path,
-                                    adm_path, logfile_name, pool, pool));
+                                    adm_path, logfile_name,
+                                    scratch_pool, scratch_pool));
 
   SVN_ERR_W(svn_stream_write(stream, log_content->data, &len),
-            apr_psprintf(pool, _("Error writing log for '%s'"),
-                         svn_dirent_local_style(logfile_name, pool)));
+            apr_psprintf(scratch_pool, _("Error writing log for '%s'"),
+                         svn_dirent_local_style(logfile_name,
+                                                scratch_pool)));
 
   return svn_wc__close_adm_stream(stream, temp_file_path, adm_path,
-                                  logfile_name, pool);
+                                  logfile_name, scratch_pool);
 }
 
 
Index: subversion/libsvn_wc/log.h
===================================================================
--- subversion/libsvn_wc/log.h	(revision 38915)
+++ subversion/libsvn_wc/log.h	(working copy)
@@ -41,9 +41,9 @@
  *
  * NOTES
  *
- *  * When a doc string says "Extend **LOG_ACCUM", it means: "if *LOG_ACCUM is
- *    NULL then set *LOG_ACCUM to a new stringbuf allocated in POOL, else
- *    append to the existing stringbuf there."
+ * * When a doc string says "Extend **LOG_ACCUM", it means: "if
+ *   *LOG_ACCUM is NULL then set *LOG_ACCUM to a new stringbuf allocated
+ *   in RESULT_POOL, else append to the existing stringbuf there."
  */
 
 /* Each path argument to the svn_wc__loggy_* functions in this section can
@@ -72,12 +72,16 @@
 /* Extend **LOG_ACCUM with log instructions to mark PATH as committed
    with revision REVNUM.
    ADM_ACCESS is the access baton for PATH.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_committed(svn_stringbuf_t **log_accum,
                         svn_wc_adm_access_t *adm_access,
                         const char *path, svn_revnum_t revnum,
-                        apr_pool_t *pool);
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool);
 
 
 /* Extend **LOG_ACCUM with log instructions to copy (and translate!) the
@@ -87,17 +91,24 @@
    The test for existence is made during this call, not at log running time.
 
    SRC_PATH and DST_PATH are relative to ADM_ACCESS.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_copy(svn_stringbuf_t **log_accum,
                    svn_wc_adm_access_t *adm_access,
                    const char *src_path, const char *dst_path,
-                   apr_pool_t *pool);
+                   apr_pool_t *result_pool,
+                   apr_pool_t *scratch_pool);
 
 
 /* Extend **LOG_ACCUM with log instructions to generate a translated
    file from SRC to DST with translation settings from VERSIONED.
    DST and SRC and VERSIONED are relative to ADM_ACCESS.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_translated_file(svn_stringbuf_t **log_accum,
@@ -105,38 +116,51 @@
                               const char *dst,
                               const char *src,
                               const char *versioned,
-                              apr_pool_t *pool);
+                              apr_pool_t *result_pool,
+                              apr_pool_t *scratch_pool);
 
 /* Extend **LOG_ACCUM with log instructions to delete the entry
    associated with PATH from the entries file.
    ADM_ACCESS is the access baton for PATH.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_delete_entry(svn_stringbuf_t **log_accum,
                            svn_wc_adm_access_t *adm_access,
                            const char *path,
-                           apr_pool_t *pool);
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool);
 
 
 /* Extend **LOG_ACCUM with log instructions to delete lock related
    fields from the entry belonging to PATH.
    ADM_ACCESS is the access baton for PATH.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_delete_lock(svn_stringbuf_t **log_accum,
                           svn_wc_adm_access_t *adm_access,
                           const char *path,
-                          apr_pool_t *pool);
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool);
 
 /* Extend **LOG_ACCUM with log instructions to delete changelist
    from the entry belonging to PATH.
    ADM_ACCESS is the access baton for PATH.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_delete_changelist(svn_stringbuf_t **log_accum,
                                 svn_wc_adm_access_t *adm_access,
                                 const char *path,
-                                apr_pool_t *pool);
+                                apr_pool_t *result_pool,
+                                apr_pool_t *scratch_pool);
 
 /* Extend **LOG_ACCUM with commands to modify the entry associated with PATH
    in ADM_ACCESS according to the flags specified in MODIFY_FLAGS, based on
@@ -144,6 +168,9 @@
 
    The flags in MODIFY_FLAGS are to be taken from the svn_wc__entry_modify()
    parameter by the same name.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_entry_modify(svn_stringbuf_t **log_accum,
@@ -151,11 +178,15 @@
                            const char *path,
                            const svn_wc_entry_t *entry,
                            apr_uint64_t modify_flags,
-                           apr_pool_t *pool);
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool);
 
 /* Extend **LOG_ACCUM with log instructions to modify wcprop PROPNAME
    for PATH, setting it to PROPVAL (which may be NULL to delete the property).
    ADM_ACCESS is the access baton for PATH.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_modify_wcprop(svn_stringbuf_t **log_accum,
@@ -163,7 +194,8 @@
                             const char *path,
                             const char *propname,
                             const char *propval,
-                            apr_pool_t *pool);
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
 
 
 /* Extend **LOG_ACCUM with log instructions to move the file SRC_PATH to
@@ -177,12 +209,16 @@
    Set *DST_MODIFIED (if DST_MODIFIED isn't NULL) to indicate whether the
    destination path will have been modified after running the log: if either
    the move or the remove will have been carried out.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_move(svn_stringbuf_t **log_accum,
                    svn_wc_adm_access_t *adm_access,
                    const char *src_path, const char *dst_path,
-                   apr_pool_t *pool);
+                   apr_pool_t *result_pool,
+                   apr_pool_t *scratch_pool);
 
 
 
@@ -190,24 +226,32 @@
    to 'executable' if it has the 'executable' property set.
    The property is tested at log run time, within this log instruction.
    ADM_ACCESS is the access baton for PATH.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_maybe_set_executable(svn_stringbuf_t **log_accum,
                                    svn_wc_adm_access_t *adm_access,
                                    const char *path,
-                                   apr_pool_t *pool);
+                                   apr_pool_t *result_pool,
+                                   apr_pool_t *scratch_pool);
 
 /* Extend **LOG_ACCUM with log instructions to set permissions of PATH
    to 'readonly' if it has the 'needs-lock' property set and there is
    no lock for the file in the working copy.
    The tests are made at log run time, within this log instruction.
    ADM_ACCESS is the access baton for PATH.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_maybe_set_readonly(svn_stringbuf_t **log_accum,
                                  svn_wc_adm_access_t *adm_access,
                                  const char *path,
-                                 apr_pool_t *pool);
+                                 apr_pool_t *result_pool,
+                                 apr_pool_t *scratch_pool);
 
 
 /* Extend **LOG_ACCUM with log instructions to set the timestamp of PATH
@@ -215,63 +259,85 @@
 
    Use one of the SVN_WC__ENTRY_ATTR_* values for TIME_PROP.
    ADM_ACCESS is the access baton for PATH.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_set_entry_timestamp_from_wc(svn_stringbuf_t **log_accum,
                                           svn_wc_adm_access_t *adm_access,
                                           const char *path,
-                                          apr_pool_t *pool);
+                                          apr_pool_t *result_pool,
+                                          apr_pool_t *scratch_pool);
 
 
 /* Extend **LOG_ACCUM with log instructions to set the file size of PATH
    in the entries' WORKING_SIZE field.
    ADM_ACCESS is the access baton for PATH.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_set_entry_working_size_from_wc(svn_stringbuf_t **log_accum,
                                              svn_wc_adm_access_t *adm_access,
                                              const char *path,
-                                             apr_pool_t *pool);
+                                             apr_pool_t *result_pool,
+                                             apr_pool_t *scratch_pool);
 
 
 /* Extend **LOG_ACCUM with log instructions to set permissions of PATH
    to 'readonly'.
    ADM_ACCESS is the access baton for PATH.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_set_readonly(svn_stringbuf_t **log_accum,
                            svn_wc_adm_access_t *adm_access,
                            const char *path,
-                           apr_pool_t *pool);
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool);
 
 /* Extend **LOG_ACCUM with log instructions to set the timestamp of PATH to
    the time TIMESTR.
    ADM_ACCESS is the access baton for PATH.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_set_timestamp(svn_stringbuf_t **log_accum,
                             svn_wc_adm_access_t *adm_access,
                             const char *path,
                             const char *timestr,
-                            apr_pool_t *pool);
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
 
 /* Extend **LOG_ACCUM with log instructions to remove the file
    PATH, if it exists.
    ADM_ACCESS is the access baton for PATH.
+
+   Allocate *LOG_ACCUM in RESULT_POOL if it is NULL. Use SCRATCH_POOL
+   for temporary allocations.
 */
 svn_error_t *
 svn_wc__loggy_remove(svn_stringbuf_t **log_accum,
                      svn_wc_adm_access_t *adm_access,
                      const char *path,
-                     apr_pool_t *pool);
+                     apr_pool_t *result_pool,
+                     apr_pool_t *scratch_pool);
 
 /* Create a log file with LOG_NUMBER. Write LOG_CONTENT to it and close-
    and-sync afterwards. ADM_ACCESS must point to a locked working copy.
+
+   Use SCRATCH_POOL for temporary allocations.
 */
 svn_error_t *
 svn_wc__write_log(svn_wc_adm_access_t *adm_access,
                   int log_number, svn_stringbuf_t *log_content,
-                  apr_pool_t *pool);
+                  apr_pool_t *scratch_pool);
 
 
 /* Set PRESENT if there is a log file present for the working copy directory
@@ -290,10 +356,13 @@
 
    If the log fails on its first command, return the error
    SVN_ERR_WC_BAD_ADM_LOG_START.  If it fails on some subsequent
-   command, return SVN_ERR_WC_BAD_ADM_LOG. */
+   command, return SVN_ERR_WC_BAD_ADM_LOG.
+
+   Use SCRATCH_POOL for temporary allocations.
+ */
 svn_error_t *svn_wc__run_log(svn_wc_adm_access_t *adm_access,
                              const char *diff3_cmd,
-                             apr_pool_t *pool);
+                             apr_pool_t *scratch_pool);
 
 
 #ifdef __cplusplus

