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

Re: how to check in a symlink?

From: Travis P <svn_at_castle.fastmail.fm>
Date: 2004-04-05 21:52:51 CEST

On Apr 5, 2004, at 2:17 PM, John Peacock wrote:

> I haven't seen a lot of discussion about what use case versioning
> symlinks really supports.
> But I have no idea why you would want to version filesystem symlinks
> in the repository. Better to have the Makefile recreate the symlinks
> (copies on Windows) before building...

Symlinks are very useful in other cases that do not involve builds and
so have no Makefile.

Here are three generic instances where I find symlinks useful daily:

1) User doesn't care that the program is actually implemented by a
script. Sometimes it's nice for the developer to have the script in a
particular segregated place where it can have its specific
file-extension:
.../scripts/my-prog-implementation.pl
.../bin/my-prog -> ../scripts/my-prog-implementation.pl

2) Sometimes one script can do generic stuff and then perform different
function depending on how it was invoked. I do this to wrap programs
written in Java. The users never know that when they run prog-a, a
wrapper sets up some env vars and then runs "java
com.company.product.prog-a @ARGV". We have other programs that are
binary/non-java-related and also take advantage of this feature.
.../scripts/my-java-wrapper-script.pl
.../bin/prog-a -> ../scripts/my-java-wrapper-script.pl
.../bin/prog-b -> ../scripts/my-java-wrapper-script.pl

3) Consider a distribution on AFS (or IBM's DFS) to multiple unix
platforms, it might look something like this:

lrwxr-xr-x bin -> .bin-@sys
lrwxr-xr-x bin-64 -> .bin-64-@sys
lrwxr-xr-x .bin-64-amd64_linux24 -> .bin-linux64
lrwxr-xr-x .bin-64-hp_ux110 -> .bin-hp64
lrwxr-xr-x .bin-64-hp_ux11i -> .bin-hp64
lrwxr-xr-x .bin-64-rs_aix51 -> .bin-aix64
lrwxr-xr-x .bin-64-sun4x_58 -> .bin-sun64
lrwxr-xr-x .bin-64-sun4x_59 -> .bin-sun64
drwxr-xr-x .bin-aix
drwxr-xr-x .bin-aix64
lrwxr-xr-x .bin-amd64_linux24 -> .bin-linux
drwxr-xr-x .bin-hp64
lrwxr-xr-x .bin-i386_linux24 -> .bin-linux
drwxr-xr-x .bin-linux
drwxr-xr-x .bin-linux64
lrwxr-xr-x .bin-rs_aix51 -> .bin-aix
drwxr-xr-x .bin-sun64

That way .../bin/program "just works."

It would be nice if I could store my distribution as-is in Subversion
and then just deploy a copy via 'export'.
Currently, I am using a 'makeSymlinks.sh' script workaround that needs
to be explicitly invoked after checkout/export.
I'm sure there are other use scenarios that I'm not covering. These
three were just obvious to me. (1) and (2) in particular I would like
to use with Subversion.

Are there other ways to do it all this besides symlinks? Sure.
Clearly Windows has survived without symlinks. But lots of us would
like to take advantage of symlinks which most Unix-related platforms
provide.

I hope Jeff's
  "2. Punt on Windows (i.e. warning or error message)"
is considered a viable option.

-Travis

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Apr 5 21:57:33 2004

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.