Loading...
Searching...
No Matches
Cleanup an abnormally terminated working copy.
Client working copy management

## Functions

svn_error_t * | svn_client_vacuum (const char *dir_abspath, svn_boolean_t remove_unversioned_items, svn_boolean_t remove_ignored_items, svn_boolean_t fix_recorded_timestamps, svn_boolean_t vacuum_pristines, svn_boolean_t include_externals, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool)
| Recursively vacuum a working copy directory dir_abspath, removing unnecessary data.
svn_error_t * | svn_client_cleanup2 (const char *dir_abspath, svn_boolean_t break_locks, svn_boolean_t fix_recorded_timestamps, svn_boolean_t clear_dav_cache, svn_boolean_t vacuum_pristines, svn_boolean_t include_externals, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool)
| Recursively cleanup a working copy directory dir_abspath, finishing any incomplete operations, removing lockfiles, etc.
svn_error_t * | svn_client_cleanup (const char *dir, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool)
| Like svn_client_cleanup2(), but no support for not breaking locks and cleaning up externals and using a potentially non absolute path.

## Detailed Description

## Function Documentation

## svn_client_cleanup()

svn_error_t * svn_client_cleanup | ( | const char * | dir,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | scratch_pool
| ) |  |

Like svn_client_cleanup2(), but no support for not breaking locks and cleaning up externals and using a potentially non absolute path.

Deprecated:
  Provided for limited backwards compatibility with the 1.8 API.

## svn_client_cleanup2()

svn_error_t * svn_client_cleanup2 | ( | const char * | dir_abspath,
|  | svn_boolean_t | break_locks,
|  | svn_boolean_t | fix_recorded_timestamps,
|  | svn_boolean_t | clear_dav_cache,
|  | svn_boolean_t | vacuum_pristines,
|  | svn_boolean_t | include_externals,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | scratch_pool
| ) |  |

Recursively cleanup a working copy directory dir_abspath, finishing any incomplete operations, removing lockfiles, etc.

If break_locks is `TRUE`, existing working copy locks at or below dir_abspath are broken, otherwise a normal write lock is obtained.

If fix_recorded_timestamps is `TRUE`, this function fixes recorded timestamps for unmodified files in the working copy, reducing comparision time on future checks.

If clear_dav_cache is `TRUE`, the caching of DAV information for older mod_dav served repositories is cleared. This clearing invalidates some cached information used for pre-HTTPv2 repositories.

If vacuum_pristines is `TRUE`, and dir_abspath points to the working copy root unreferenced files in the pristine store are removed.

If include_externals is `TRUE`, recurse into externals and clean them up as well.

If ctx->cancel_func is non-NULL, invoke it with ctx->cancel_baton at various points during the operation. If it returns an error (typically SVN_ERR_CANCELLED), return that error immediately.

Use scratch_pool for any temporary allocations.

Since
  New in 1.9.

## svn_client_vacuum()

svn_error_t * svn_client_vacuum | ( | const char * | dir_abspath,
|  | svn_boolean_t | remove_unversioned_items,
|  | svn_boolean_t | remove_ignored_items,
|  | svn_boolean_t | fix_recorded_timestamps,
|  | svn_boolean_t | vacuum_pristines,
|  | svn_boolean_t | include_externals,
|  | svn_client_ctx_t * | ctx,
|  | apr_pool_t * | scratch_pool
| ) |  |

Recursively vacuum a working copy directory dir_abspath, removing unnecessary data.

If include_externals is `TRUE`, recurse into externals and vacuum them as well.

If remove_unversioned_items is `TRUE`, remove unversioned items in dir_abspath after successful working copy cleanup. If remove_ignored_items is `TRUE`, remove ignored unversioned items in dir_abspath after successful working copy cleanup.

If fix_recorded_timestamps is `TRUE`, this function fixes recorded timestamps for unmodified files in the working copy, reducing comparision time on future checks.

If vacuum_pristines is `TRUE`, and dir_abspath points to the working copy root unreferenced files in the pristine store are removed.

When asked to remove unversioned or ignored items, and the working copy is already locked, return SVN_ERR_WC_LOCKED. This prevents accidental working copy corruption in case users run the cleanup operation to remove unversioned items while another client is performing some other operation on the working copy.

If ctx->cancel_func is non-NULL, invoke it with ctx->cancel_baton at various points during the operation. If it returns an error (typically SVN_ERR_CANCELLED), return that error immediately.

Use scratch_pool for any temporary allocations.

Since
  New in 1.9.