2 * cleanup.c: wrapper around wc cleanup functionality.
4 * ====================================================================
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License. You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied. See the License for the
19 * specific language governing permissions and limitations
21 * ====================================================================
24 /* ==================================================================== */
32 #include "svn_client.h"
33 #include "svn_config.h"
34 #include "svn_dirent_uri.h"
36 #include "svn_pools.h"
38 #include "svn_props.h"
40 #include "svn_private_config.h"
46 svn_client_cleanup(const char *path,
47 svn_client_ctx_t *ctx,
48 apr_pool_t *scratch_pool)
50 const char *local_abspath;
53 if (svn_path_is_url(path))
54 return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
55 _("'%s' is not a local path"), path);
57 SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
59 err = svn_wc_cleanup3(ctx->wc_ctx, local_abspath, ctx->cancel_func,
60 ctx->cancel_baton, scratch_pool);
61 svn_io_sleep_for_timestamps(path, scratch_pool);
62 return svn_error_trace(err);