Shouldn't we copy the target of the link instead of duplicating the link? That is how I interpreted hot*copy*: creating a backup copy independent of the original. (maybe unix admins think differently about this?)
Bert Huijben (mobile phone) ----- Oorspronkelijk bericht ----- Van: style...@apache.org Verzonden: woensdag 2 juni 2010 11:15 Aan: comm...@subversion.apache.org Onderwerp: svn commit: r950445 - in /subversion/trunk/subversion: libsvn_repos/repos.c libsvn_subr/io.c Author: stylesen Date: Wed Jun 2 09:15:38 2010 New Revision: 950445 URL: http://svn.apache.org/viewvc?rev=950445&view=rev Log: Fix issue #2591 - 'svnadmin hotcopy' does not replicate symlinks. * subversion/libsvn_repos/repos.c (hotcopy_structure): If there is a symlink, then copy it. * subversion/libsvn_subr/io.c (svn_io_dir_walk): Add support to recurse through a symlink. This does not require an API rev since we did not change the signature of this public API. Patch by: Nico Kadel-Garcia <nka...@tigris.org> (Tweaked by me) Modified: subversion/trunk/subversion/libsvn_repos/repos.c subversion/trunk/subversion/libsvn_subr/io.c Modified: subversion/trunk/subversion/libsvn_repos/repos.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/repos.c?rev=950445&r1=950444&r2=950445&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_repos/repos.c (original) +++ subversion/trunk/subversion/libsvn_repos/repos.c Wed Jun 2 09:15:38 2010 @@ -1837,6 +1837,8 @@ static svn_error_t *hotcopy_structure(vo return create_repos_dir(target, pool); else if (finfo->filetype == APR_REG) return svn_io_copy_file(path, target, TRUE, pool); + else if (finfo->filetype == APR_LNK) + return svn_io_copy_link(path, target, pool); else return SVN_NO_ERROR; } Modified: subversion/trunk/subversion/libsvn_subr/io.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=950445&r1=950444&r2=950445&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_subr/io.c (original) +++ subversion/trunk/subversion/libsvn_subr/io.c Wed Jun 2 09:15:38 2010 @@ -3255,7 +3255,7 @@ svn_io_dir_walk(const char *dirname, walk_baton, subpool)); } - else if (finfo.filetype == APR_REG) + else if (finfo.filetype == APR_REG || finfo.filetype == APR_LNK) { /* some other directory. pass it to the callback. */ SVN_ERR(entry_name_to_utf8(&name_utf8, finfo.name, dirname,