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

Re: How to convert a regular file to a sym link?

From: Toby Johnson <toby_at_etjohnson.us>
Date: 2005-12-02 05:33:45 CET

Matt England wrote:

>At 12/1/2005 10:37 AM, Saulius Grazulis wrote:
>
>
>>*nix> for i in `svn st | awk '/^~/{print $2}'`; do ( set -x; mv $i $i-old; svn
>>del $i; svn ci -m "Deleting $i" $i; mv $i-old $i; svn add $i; sv ci
>>"Committing new $i"; ) done
>>
>>
>Ok, so this looks like an automated means to do execute the manual process describe above, and that's a good thing.
>
>However, I was hoping there was an alternative way to do this via subversion, at least on a per-file basis, other then the svn del-then-add process, chiefly because said process loses the file history properties (I think).
>
>
Subversion stores symlinks as a regular text file containing what the
link points to, along with a special property, I believe "svn:special"
or something of the sort. Instead of a script to delete/recreate the
files, you could use one to set all those special properties.

But no, I don't think there's a way for Subversion to just do that
automatically. And by the way, when you place a symlink into Subversion,
you won't be able to view the contents or history of what that symlink
points to from within Subversion. So if the target file changes, you
won't be able to "svn log" the symlink and see those changes, for
example. Maybe knowing this will make preserving history seem less
important.
Received on Fri Dec 2 05:37:20 2005

This is an archived mail posted to the Subversion Users mailing list.