[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: Saulius Grazulis <grazulis_at_akl.lt>
Date: 2005-12-01 17:37:04 CET

On Thursday 01 December 2005 18:15, Matt England wrote:

> Any more thoughts on this?  I need to solve this problem pretty soon, would
like to do this for all my files across the board in a more-elegant way then
the following:
> >The only thing I can think of right now is to 'svn revert', 'svn del',
> > then 'svn add' the file after running my ldconfig (that creates the sym
> > link) again.  This seems rather cumbersome to do for every file.
>
> To be clear, all these files show up as:
>
> # svn status
> ~     mylib.so.1.0
> [...]
>
> Thanks for any help.  More details below.

I would try something like this (careful, commands untested! Dont run them as
root, check before!):

*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

To check that the commands really do what you want, put 'true' or 'echo' in
front of every 'svn' and 'mv' command in the above example and run the
resulting command; when you see that it is going to do what you want, remove
'echo/trure' and run once more.

Hope this helps.

-- 
Dr. Saulius Gražulis
Visuomeninė organizacija "Atviras Kodas Lietuvai"
P.Vileišio g. 18
LT-10306 Vilnius
Lietuva (Lithuania)
tel/fax:      (+370-5)-210 40 05
mobilus:      (+370-684)-49802, (+370-614)-36366
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 1 17:44:51 2005

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.