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

Re: how to make svn _follow_ symbolic links?

From: Misha Aizatulin <avatar_at_hot.ee>
Date: Wed, 22 Jul 2009 00:06:44 +0300

Blair Zajac wrote:

> It doesn't choke. It was deliberately designed to handle symbolic
> links. If you re-symlink a symlink, then Subversion will see the change
> and allow you to version path the symlink points to just as Subversion
> version's file content changes.

  It is a nice feature, but it doesn't work, if the symlink points to a
file outside of the repository. And this has to be the case, if I want
to add the same file to two repositories.

>> Is there any reason not to implement following symbolic links? Is it a
>> design decision or just due to the fact that no one requested it so far?
>> Again, shall I write a feature request?
>
> How would the feature work? How would you tell Subversion to follow
> this link?

  I'd suggest setting a property, but I'd be happy with any method.

> How would Subversion work with updating that file atomically? What
> happens if you have two svn updates running at the same time that want
> to update the file at the location the symlink references?

  Well, what happens, if I try to manually change a regular file during
an svn update? If the answer is "a mess", then there is no bigger mess
with symlinks. If the answer is "svn uses locking / checksum
verification / whatever", then why not apply these mechanisms to the
target of the link?
  With one word, svn should treat the link target exactly as if it were
a regular file.

> BTW, it takes more work in the code to follow them then not too, because
> you have to check if it's a symlink or not and then use readlink() to
> get what the symlink points to.

  Oh, ok. I always thought that doing a regular open() would follow the
links, so that if the programmer does nothing, the links are treated
transparently. I never checked myself though.

Misha

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2373430

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-21 23:07:50 CEST

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.