[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svnadmin hotcopy does not duplicate symlinks

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-07-21 22:54:01 CEST

On 7/21/06, Nico Kadel-Garcia <nkadel@comcast.net> wrote:
> Garrett Rooney wrote:
> > On 7/20/06, Nico Kadel-Garcia <nkadel@comcast.net> wrote:
> >> The "svnadmin hotcopy" command does not duplicate symlinks that
> >> might be in a repository. This makes the backup of any such
> >> repositories with symlinks in them somewhat more difficult: I'm
> >> reporting the issue here before submitting a bug for it, in case
> >> anyone disagrees or has additional commentary.
> >
> > Where would these symlinks be? Could you give a concrete example of
> > what you're doing and what you expect the behavior to me?
>
> Certainly. I'd like to have similar pre-commit and configuration files among
> multiple repos. Therefore, I create symlinks such as:
>
> $repo1/hooks/pre-commit -> ../../default/hooks/pre-commit
> $repo1/conf/passwd -> ../../default/conf/passwd
> $repo2/hooks/pre-commit -> ../../defaults/hook/pre-commit
> $repo2/conf/passwd -> ../../default/conf/passwd
>
> Unfortunately, when I use "svnadmin hotcopy $repo1 /tmp/mirror1", the
> duplicated repository in /tmp/mirror1 doesn't have any of the symlinks from
> $repo1: they are skipped over, silently and without any reported error.

This is completely and totally untested, but can you give it a shot:

Index: subversion/libsvn_repos/repos.c
===================================================================
--- subversion/libsvn_repos/repos.c (revision 20824)
+++ subversion/libsvn_repos/repos.c (working copy)
@@ -2007,9 +2007,12 @@
     }
   else if (finfo->filetype == APR_REG)
     {
-
       SVN_ERR(svn_io_copy_file(path, target, TRUE, pool));
     }
+ else if (finfo->filetype == APR_LNK)
+ {
+ SVN_ERR(svn_io_copy_link(path, target, pool));
+ }

   return SVN_NO_ERROR;
 }

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 21 22:55:14 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.