[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: Mike Dixon <michael.dixon_at_denovosoftware.com>
Date: Tue, 21 Jul 2009 16:59:18 -0700

Les Mikesell wrote:
>> 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.
>>
>>
> Remember, subversion expects other people to be committing changes and
> it expects you to be updating your working copies. Are you sure you
> want the symlink targets to update?

To elaborate on this, are you the only person with commit access to the
bib file in both A and B? The specific case that makes me itch is this:

- UserA has commit access to repository A but not repository B.
- He checks out a copy of bib from A, makes a change and commits.
- Bib-A and Bib-B are now not identical.
- You update your WC-A and WC-B. What happens?

My guess is that you would like for the file to show up as modified in
WC-B, since B is out of date. However, I suspect that this would be
difficult, because the working copies don't know that they're sharing a
file; you would need to take a careful look at the logs for both A and B
to see which one is correct.

Really I think a lot of what's going on here is caused by a deeper
problem; you have a rule about data integrity that you want to enforce:
"bib must be the same in all repositories". But you're trying to enforce
the rule using the working copies of your local machine. What happens if
your working copy gets corrupted and you have to do a fresh check-out?
What if you go on vacation and other people want to keep working with
the file?

I'd suggest considering setting up the syncing server-side instead, for
example via the post-commit hook of both repositories. I don't know
hardly anything about svnsync (our svn setup here is sufficiently simple
that I haven't needed to research it), but perhaps it can be used to
sync only certain files?

At any rate, don't need to use symlinks in your working copy to get your
desired workflow if you can get the servers to talk to each other. Once
that's set up, you can make the change to bib in whichever working copy
you like, then when you commit it will be automatically sent to the
other server as well.

-Mike

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-22 02:02:04 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.