Index: subversion/include/svn_wc.h
===================================================================
--- subversion/include/svn_wc.h	(revision 38718)
+++ subversion/include/svn_wc.h	(arbetskopia)
@@ -5558,12 +5558,10 @@
 
 
 /**
- * Recurse from @a path, upgrading to the latest working copy format if
+ * Recurse from @a abspath, upgrading to the latest working copy format if
  * @a upgrade_wc is set, and cleaning up unfinished log business.  Perform
  * any temporary allocations in @a scratch_pool.  Any working copy locks
- * under @a path will be taken over and then cleared by this function.  If
- * @a diff3_cmd is non-NULL, then use it as the diff3 command for any
- * merging; otherwise, use the built-in merge code.
+ * under @a path will be taken over and then cleared by this function.  
  *
  * WARNING: there is no mechanism that will protect locks that are still
  * being used.
@@ -5572,9 +5570,23 @@
  * various points during the operation.  If it returns an error
  * (typically @c SVN_ERR_CANCELLED), return that error immediately.
  *
- * @since New in 1.2.
+ * @since New in 1.7.
  */
 svn_error_t *
+svn_wc_cleanup3(const char *abspath,
+                svn_wc_context_t *wc_ctx,
+                svn_cancel_func_t cancel_func,
+                void *cancel_baton,
+                apr_pool_t *scratch_pool);
+
+/**
+ * Similar to svn_wc_cleanup3() but uses relative paths and creates its own
+ * swn_wc_context_t.
+ *
+ * @deprecated Provided for backward compability with the 1.2 API.
+ */
+SVN_DEPRECATED
+svn_error_t *
 svn_wc_cleanup2(const char *path,
                 const char *diff3_cmd,
                 svn_cancel_func_t cancel_func,
Index: subversion/libsvn_wc/deprecated.c
===================================================================
--- subversion/libsvn_wc/deprecated.c	(revision 38718)
+++ subversion/libsvn_wc/deprecated.c	(arbetskopia)
@@ -2268,6 +2268,27 @@
 /*** From log.c ***/
 
 svn_error_t *
+svn_wc_cleanup2(const char *path,
+                const char *diff3_cmd,
+                svn_cancel_func_t cancel_func,
+                void *cancel_baton,
+                apr_pool_t *pool)
+{
+  svn_wc__db_t *db;
+  svn_wc_context_t *wc_ctx;
+  const char *abspath;
+
+  SVN_ERR(svn_wc__db_open(&db, svn_wc__db_openmode_readwrite,
+                         NULL, pool, pool));
+
+  SVN_ERR(svn_dirent_get_absolute(&abspath, path, pool));
+
+  SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL, db, pool));
+
+  return svn_wc_cleanup3(abspath, wc_ctx, cancel_func, cancel_baton, pool);
+}
+
+svn_error_t *
 svn_wc_cleanup(const char *path,
                svn_wc_adm_access_t *optional_adm_access,
                const char *diff3_cmd,
Index: subversion/libsvn_wc/log.c
===================================================================
--- subversion/libsvn_wc/log.c	(revision 38718)
+++ subversion/libsvn_wc/log.c	(arbetskopia)
@@ -2388,37 +2388,31 @@
   return svn_wc_adm_close2(adm_access, scratch_pool);
 }
 
-
 svn_error_t *
-svn_wc_cleanup2(const char *path,
-                const char *diff3_cmd,  /* ### OBSOLETE  */
+svn_wc_cleanup3(const char *abspath,
+                svn_wc_context_t *wc_ctx,
                 svn_cancel_func_t cancel_func,
                 void *cancel_baton,
-                apr_pool_t *scratch_pool)
+                apr_pool_t * scratch_pool)
 {
-  svn_wc__db_t *db;
-  const char *local_abspath;
   int wc_format_version;
 
-  SVN_ERR(svn_wc__db_open(&db, svn_wc__db_openmode_readwrite,
-                          NULL /* ### config */, scratch_pool, scratch_pool));
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(abspath));
 
-  SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
-
-  SVN_ERR(svn_wc__internal_check_wc(&wc_format_version, db, local_abspath,
+  SVN_ERR(svn_wc__internal_check_wc(&wc_format_version, wc_ctx->db, abspath,
                                     scratch_pool));
 
   /* a "version" of 0 means a non-wc directory */
   if (wc_format_version == 0)
     return svn_error_createf(SVN_ERR_WC_NOT_DIRECTORY, NULL,
                              _("'%s' is not a working copy directory"),
-                             svn_dirent_local_style(path, scratch_pool));
+                             svn_dirent_local_style(abspath, scratch_pool));
 
   if (wc_format_version < SVN_WC__VERSION)
     return svn_error_create(SVN_ERR_WC_UNSUPPORTED_FORMAT, NULL,
                             _("Log format too old, please use "
-                              "Subversion 1.6 or earlier"));
+                              "Subversion 1.7 or earlier"));
 
-  return svn_error_return(cleanup_internal(db, path, cancel_func, cancel_baton,
-                                           scratch_pool));
+  return svn_error_return(cleanup_internal(wc_ctx->db, abspath, cancel_func, 
+                                           cancel_baton, scratch_pool));
 }
Index: subversion/libsvn_client/cleanup.c
===================================================================
--- subversion/libsvn_client/cleanup.c	(revision 38718)
+++ subversion/libsvn_client/cleanup.c	(arbetskopia)
@@ -44,17 +44,12 @@
                    svn_client_ctx_t *ctx,
                    apr_pool_t *scratch_pool)
 {
-  const char *diff3_cmd;
+  const char *abspath;
   svn_error_t *err;
-  svn_config_t *cfg = ctx->config
-    ? apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
-                   APR_HASH_KEY_STRING)
-    : NULL;
 
-  svn_config_get(cfg, &diff3_cmd, SVN_CONFIG_SECTION_HELPERS,
-                 SVN_CONFIG_OPTION_DIFF3_CMD, NULL);
+  SVN_ERR(svn_dirent_get_absolute(&abspath, path, scratch_pool));
 
-  err = svn_wc_cleanup2(path, diff3_cmd, ctx->cancel_func,
+  err = svn_wc_cleanup3(abspath, ctx->wc_ctx, ctx->cancel_func,
                         ctx->cancel_baton, scratch_pool);
   svn_io_sleep_for_timestamps(path, scratch_pool);
   return svn_error_return(err);
