[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: Toby Thain <toby_at_telegraphics.com.au>
Date: Mon, 12 Jan 2009 09:50:57 -0500

On 12-Jan-09, at 8:03 AM, Steve Cohen wrote:

> Yeah, I would never just fire it off without some testing.
>
> Instead of
>
> svn mv $_ $1.cpp
>
> I first do the command with
>
> ls -al $_
>
> To see that the correct files are retrieved.

In my case I used print() first.

>
>
>
> Jan Hendrik wrote:
>> Concerning Re: svn rename glob?
>> Steve Cohen wrote on 11 Jan 2009, 9:59, at least in part:
>>
>>
>>> You win the prize for the simplest syntax that works on my platform.
>>>
>>> I've never been a big fan of perl but in this case, it rocked!
>>>
>>
>> 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.

However, since it's a working copy, if 'svn status' showed something
amiss, you'd have the opportunity to revert and try again. :)

--Toby

>>
>> Jan Hendrik
>>
>>> Thanks!
>>>
>>>
>>> Toby Thain wrote:
>>>
>>>> On 10-Jan-09, at 3:50 PM, 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?
>>>>>
>>>>>
>>>> Recursively rename all '.c' to '.cpp' in current working copy
>>>> directory:
>>>>
>>>> $ find . -name \*.c |perl -n -e 'chomp; m/^(.*)\.[^\/]*$/ && system
>>>> ("svn mv $_ $1.cpp")'
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> ------------------------------------------------------
>>>>> http://subversion.tigris.org/ds/viewMessage.do?
>>>>> dsForumId=1065&dsMessageId=1015782
>>>>>
>>>>> To unsubscribe from this discussion, e-mail: [users-
>>>>> unsubscribe_at_subversion.tigris.org].
>>>>>
>>>>>
>>>> ------------------------------------------------------
>>>> http://subversion.tigris.org/ds/viewMessage.do?
>>>> dsForumId=1065&dsMess
>>>> ageId=1016795
>>>>
>>>> To unsubscribe from this discussion, e-mail:
>>>> [users-unsubscribe_at_subversion.tigris.org].
>>>>
>>>>
>>>>
>>>>
>>> ------------------------------------------------------
>>> http://subversion.tigris.org/ds/viewMessage.do?
>>> dsForumId=1065&dsMessag
>>> eId=1017206
>>>
>>> To unsubscribe from this discussion, e-mail:
>>> [users-unsubscribe_at_subversion.tigris.org].
>>>
>>
>>
>> ---------------------------------------
>> Freedom quote:
>>
>> Freedom is the right to question and change
>> the established way of doing things.
>> It is the continuous revolution of the marketplace,
>> and the understanding that allows us to recognize shortcomings
>> and seek solutions.
>> -- Ronald Reagan
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?
>> dsForumId=1065&dsMessageId=1018647
>>
>> To unsubscribe from this discussion, e-mail: [users-
>> unsubscribe_at_subversion.tigris.org].
>>
>>
>>
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?
> dsForumId=1065&dsMessageId=1019009
>
> To unsubscribe from this discussion, e-mail: [users-
> unsubscribe_at_subversion.tigris.org].

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

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