How can I troubleshoot the error message "Path is not a working copy directory" when using svn_add() in PHP?
The error message "Path is not a working copy directory" typically occurs when the path provided to svn_add() is not a valid SVN working copy directory. To troubleshoot this issue, ensure that the path provided is a valid SVN working copy directory by checking if it contains the .svn hidden directory. If the path is incorrect, update it to point to the correct working copy directory.
$workingCopyPath = '/path/to/working/copy';
if (!is_dir($workingCopyPath . '/.svn')) {
die("Error: Invalid SVN working copy directory.");
}
svn_add($workingCopyPath);