* subversion/mod_dav_svn/reports/replay.c
[svn.git] / subversion / libsvn_client / cleanup.c
blobf9e0ee90f45035ec6e3cc43c7a6b82701fbe2e7e
1 /*
2 * cleanup.c: wrapper around wc cleanup functionality.
4 * ====================================================================
5 * Copyright (c) 2000-2004 CollabNet. All rights reserved.
7 * This software is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at http://subversion.tigris.org/license-1.html.
10 * If newer versions of this license are posted there, you may use a
11 * newer version instead, at your option.
13 * This software consists of voluntary contributions made by many
14 * individuals. For exact contribution history, see the revision
15 * history and logs, available at http://subversion.tigris.org/.
16 * ====================================================================
19 /* ==================================================================== */
23 /*** Includes. ***/
25 #include "svn_time.h"
26 #include "svn_wc.h"
27 #include "svn_client.h"
28 #include "svn_config.h"
29 #include "client.h"
31 #include "svn_private_config.h"
34 /*** Code. ***/
36 svn_error_t *
37 svn_client_cleanup(const char *dir,
38 svn_client_ctx_t *ctx,
39 apr_pool_t *pool)
41 const char *diff3_cmd;
42 svn_error_t *err;
43 svn_config_t *cfg = ctx->config
44 ? apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
45 APR_HASH_KEY_STRING)
46 : NULL;
48 svn_config_get(cfg, &diff3_cmd, SVN_CONFIG_SECTION_HELPERS,
49 SVN_CONFIG_OPTION_DIFF3_CMD, NULL);
51 err = svn_wc_cleanup2(dir, diff3_cmd, ctx->cancel_func, ctx->cancel_baton,
52 pool);
53 svn_sleep_for_timestamps();
54 return err;