You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bert Huijben <be...@qqmail.nl> on 2010/06/02 19:49:16 UTC

RE: svn commit: r950445 - in /subversion/trunk/subversion: libsvn_repos/repos.c libsvn_subr/io.c

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: stylesen@apache.org
Verzonden: woensdag 2 juni 2010 11:15
Aan: commits@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 <nk...@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,



Re: svn commit: r950445 - in /subversion/trunk/subversion: libsvn_repos/repos.c libsvn_subr/io.c

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Jun 02, 2010 at 09:49:16PM +0200, Bert Huijben wrote:
> 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?)

Either behaviour is desirable depending on circumstance.
I think we need a command line option to put the user in control.

Stefan