Concerning RE: svn rename glob?
Reedick, Andrew wrote on 12 Jan 2009, 8:54, at least in part:
> > -----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".
Now we enter the world between commandline and script, aren't
we? ;)
> 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 original poster of the commandline has gone astray in the
replies, but I append this to my reference saved for bold days ...
Jan Hendrik
---------------------------------------
Freedom quote:
Only our individual faith in freedom can keep us free.
-- Dwight D. Eisenhower
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1019427
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-12 17:03:37 CET