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

Dirk Heinrichs dirk.heinrichs at altum.de
Thu Feb 3 02:59:55 MST 2011


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

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?

Thanks...

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

iD8DBQFNSnyU8NVtnsLkZ7sRAtR7AKCdLKFHaws1GS56k9dMPDcFY8jN3gCbBiiJ
p/AlT4IePRTEniCqUa/X80s=
=FoCb
-----END PGP SIGNATURE-----


More information about the rsync mailing list