Problem with --link-dest from within subversion working copy

Dirk Heinrichs dirk.heinrichs at altum.de
Thu Feb 3 03:11:44 MST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 03.02.2011 10:59, schrieb Dirk Heinrichs:
> Hello,
> 
> I've just encountered an issue where using --link-dest from within a
> Subversion working copy does not create hard links as intended.
> 
> The idea is to supply the build toolchain for an embedded software
> development project to all users without having to force everybody to
> check out the whole stuff. This way we have the toolchain under version
> control and are able to provide it in a standard location.
> 
> The following test scenario can be used to reproduce the problem:
> 
> 1) Download GNU Hello 2.5 and 2.6 from ftp://ftp.gnu.org/gnu/hello and
> unpack both archives, then create some destination directories
> (optionally on a remote machine): mkdir -p /some/dir1 /some/dir2
> 
> 2) cd into hello-2.5 and run "rsync -ac --delete ./*
> [remote:]/some/dir1/HELLO_2.5"
> 
> 3) cd into ../hello-2.6 and run "rsync -ac --delete
> --link-dest=../HELLO_2.5 ./* [remote:]/some/dir1/HELLO_2.6"
> 
> This creates some hard-linked files in the destination as expected.
> 
> Now import both into some subversion repository and rerun the above from
> their checkouts:
> 
> 4) svnadmin create /some/other/dir/hello.
> 
> 5) sed -i 's%# anon-access = read%anon_access = write%'
> /some/other/dir/hello/conf/svnserve.conf
> 
> 6) svnserve -r /some/other/dir -d
> 
> 7) Checkout, create import and tags directories and switch to import:
>   - cd ~
>   - svn co svn://localhost/hello
>   - cd hello
>   - mkdir import tags
>   - svn add *
>   - svn commit -m ""
>   - svn switch svn://localhost/hello/import
> 
> 8) Go back to the hello-2.5 created in step 1) and import the stuff into
> the repository: svn import -m "" svn://localhost/hello/import
> 
> 9) Create a tag from it: svn cp -m "" svn://localhost/hello/import
> svn://localhost/hello/tags/HELLO_2.5
> 
> 10) Go to hello-2.6 from step 1) and import this, too: svn_load_dirs -t
> tags/HELLO_2.6 -wc $HOME/hello svn://rohan/hello import .
> 
> 11) Checkout from both tags:
>   - cd ~
>   - svn co svn://localhost/hello/tags/HELLO_2.5
>   - svn co svn://localhost/hello/tags/HELLO_2.6
> 
> 12) cd into HELLO_2.5 and run "rsync -ac --delete ./*
> [remote:]/some/dir2/HELLO_2.5"
> 
> 13) cd into ../HELLO_2.6 and run "rsync -ac --delete
> --link-dest=../HELLO_2.5 ./* [remote:]/some/dir2/HELLO_2.6"
> 
> This does NOT create any hard-linked files in the destination as expected.
> 
> Any hints as to what could be the cause for this and how to solve it?

In case it matters: Operating system is Linux, rsync version is:

% rsync --version
rsync  version 3.0.7  protocol version 30
Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

Bye...

	Dirk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFNSn9g8NVtnsLkZ7sRArMwAJ0XUHffuRJtUnMuASPcnfztqfogKgCfWTIe
ZYZg/zdrY3G1KNNKwf4R1HI=
=/GLP
-----END PGP SIGNATURE-----


More information about the rsync mailing list