1/* 2 * cleanup.c: wrapper around wc cleanup functionality. 3 * 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 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 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 20 * under the License. 21 * ==================================================================== 22 */ 23 24/* ==================================================================== */ 25 26 27 28/*** Includes. ***/ 29 30#include "svn_time.h" 31#include "svn_wc.h" 32#include "svn_client.h" 33#include "svn_config.h" 34#include "svn_dirent_uri.h" 35#include "svn_path.h" 36#include "svn_pools.h" 37#include "client.h" 38#include "svn_props.h" 39 40#include "svn_private_config.h" 41 42 43/*** Code. ***/ 44 45svn_error_t * 46svn_client_cleanup(const char *path, 47 svn_client_ctx_t *ctx, 48 apr_pool_t *scratch_pool) 49{ 50 const char *local_abspath; 51 svn_error_t *err; 52 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); 56 57 SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool)); 58 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); 63} 64