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

Re: svn rename glob?

From: Blair Zajac <blair_at_orcaware.com>
Date: Sat, 10 Jan 2009 19:23:24 -0800

Steve Cohen wrote:
> I wish to rename all files in a directory tree by changing their
> extension (keeping rest of filename the same) without losing history.
>
> Before I screw myself up can someone tell me if there is a way to do
> this with a single command line? If not, what would be the easiest way
> to perform this operation?

No, you'll have to do this yourself.

Something like this bash script:

for f in *.foo; do
   g="`echo $f | sed -e s'/.foo$/.bar/'`"
   echo Renaming $f to $g
   svn rename "$f" "$g"
done

Regards,
Blair

-- 
Blair Zajac, Ph.D.
CTO, OrcaWare Technologies
<blair_at_orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1016398
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-12 14:04:38 CET

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.