php8.5
Home/ Manual/ svn / functions/ svn_cleanup

svn_cleanup

PHP function Edit on GitHub ✎

(PECL svn >= 0.1.0)

Recursively cleanup a working copy directory, finishing incomplete operations and removing locks

Description

svn_cleanup(string $workingdir): bool

Recursively cleanup working copy directory workingdir, finishing any incomplete operations and removing working copy locks. Use when a working copy is in limbo and needs to be usable again.

Parameters

workingdir

String path to local working directory to cleanup

Relativepath

Return Values

Success

Examples

Basic example

This example demonstrates clean up of a working copy in a directory named help-me:

php
<?php
svn_cleanup(realpath('help-me'));
?>

The realpath() call is necessary due to SVN's quirky handling of relative paths.

Notes Func

See Also

  • update()
  • SVN documentation on svn cleanup

Source: reference/svn/functions/svn-cleanup.xml · from the official PHP manual (php/doc-en)