On 2002-05-01 22:40:16 epg wrote:
>Karl Fogel <kfogel@newton.ch.collab.net> writes:
>
>> Actually, modules just got a whole lot closer. See recent changes to
>>
>> http://subversion.tigris.org/issues/show_bug.cgi?id=517
>>
>> Anyone feel like taking it on?
>
>A co-worker and i have been kicking around the idea of writing code
>for symlinks in the repository for internal use (we're anxious to
>dump CVS :). We would of course contribute the patch, but i figured
>you wouldn't take it until after 1.0. Since it sounds like you
>might, let me describe the approach we were planning and see what
>you think.
>
>I don't like the text-file based modules. CVS does that and it
>drives me nuts. Subversion doesn't really need to duplicate this
>feature. All that is necessary is a kind of symlink in the repo.
>Clients don't even know that something is a link; they see only a
>file or directory (whatever the link points to). We'll probably
>want some way for the client to discover if a node is a link or
>not (the user might want to know for example), but under normal
>operation the client neither knows nor cares.
>
>Let's look at how this would work:
>
>svn co http://foo/repo/trunk/foo/
>cd foo
[I applied your correction to the next line:}
>svn ln http://foo/repo/trunk/doctools/ doctools
>svn ci
>svn up # at this point the doctools directory becomes populated
So far, so good. But does that link use a path or a node id?
If it's a path, what happens after you move it or copy it?
You either have a dangling reference, which is Bad, or you
have to find all the places that link to it and change them.
This is time-consuming, especially when you consider that
renaming or moving a directory will affect all links to any
file or directory underneath it. Possible, but not practical.
If it's a node, you will have to be very careful when you
make a copy of it. Copies are so symmetrical that you really
can't tell which is the copy and which the original by looking
at the node id, unless things have changed radically since I
last looked (which is possible, since I know there have been
changes in this area). Is there enough information to keep
track of this stuff?
Also, what happens when the path is removed? Does your link
keep pointing to the last revision of it, or is this an error?
The best answer might be to treat a removed path as an empty tree.
I do hope there are answers to all these questions, as I'm a great
fan of modules.
Note that if you want to link to a specific revision of a module,
a "svn cp" does this, as others have noted. Sometimes this is the
right thing to do. The dynamic case is definitely needed, though.
Peter.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 2 18:00:38 2002