[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: Reedick, Andrew <jr9445_at_ATT.COM>
Date: Mon, 12 Jan 2009 08:54:20 -0600

> -----Original Message-----
> From: Jan Hendrik [mailto:list.jan.hendrik_at_gmail.com]
> Sent: Monday, January 12, 2009 4:13 AM
> To: users_at_subversion.tigris.org
> Subject: Re: svn rename glob?
>
> Yeah, that was quite condensed. While I do a lot in Perl - when it
> comes to any sort of search&replace I never became warm with
> Python - I have one objection: these commandlines are easily fired,
> but leave little control. Only afterwards one really sees what they
> did, and if the prompt was closed in the meantime one never can
> find out what was wrong in the first place.
>
> > >
> > > $ find . -name \*.c |perl -n -e 'chomp; m/^(.*)\.[^\/]*$/ &&
system
> > > ("svn mv $_ $1.cpp")'
> > >
> > >

Instead of executing the commands immediately, just print the commands
to a file. Then run a few of the commands manually. If you're
satisfied, then run the file as a shell/batch script and capture the
output to a log file. system("svn mv $_ $1.cpp") becomes print "svn mv
$_ $1.cpp\n".

Also, you didn't wrap the filenames in quotes. If any of the filenames
had whitespace in them, the command would have failed: print qq(svn mv
"$_" "$1.cpp"\n).

*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA623

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1019324

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-12 16:48:44 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.