You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Steve Cohen <sc...@javactivity.org> on 2009/01/10 20:50:00 UTC
svn rename glob?
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?
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1015782
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: svn rename glob?
Posted by David Weintraub <qa...@gmail.com>.
If this is BASH, you should be able to do something like this:
for file in *.foo
do
svn mv $file ${file%%.foo).bar
done
The "%%" removes the right hand side of $file that matches the glob
pattern (.foo). Do a "man bash" and search for "Parameter Expansion".
You'll see an entry for "${parameter##word}" and "
${parameter%%word}".
And, if you're using an "older shell" that doesn't take this form of
parameter expansion (like plain ol' Bourne shell).
for file in *.foo
do
svn mv $file `basename $file .foo`.bar
done
Don't forget that basename not only removes the directory name, but
also a suffix if given. Since we are not matching in subdirectories,
we don't have to worry about basename removing the directory name.
Else, we may need this:
find . -name "*.foo" | while read file
do
svn mv $file `dirname $file`/`basename $file .foo`.bar
done
That's what you get with two decades in working with Unix. Let me know
if you also need any help on setting up a UUCP network or cpio. I'm
just chalked full of obsolete information!
I was working on the Internet back when it really was a series of tubes!
On Sat, Jan 10, 2009 at 10:23 PM, Blair Zajac <bl...@orcaware.com> wrote:
> 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
> <bl...@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@subversion.tigris.org].
>
--
--
David Weintraub
qazwart@gmail.com
Re: svn rename glob?
Posted by Blair Zajac <bl...@orcaware.com>.
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
<bl...@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@subversion.tigris.org].
RE: svn rename glob?
Posted by Jan Hendrik <li...@gmail.com>.
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@gmail.com]
> > Sent: Monday, January 12, 2009 4:13 AM
> > To: users@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@subversion.tigris.org].
Re: svn rename glob?
Posted by Jan Hendrik <li...@gmail.com>.
Concerning Re: svn rename glob?
Toby Thain wrote on 12 Jan 2009, 9:50, at least in part:
> >> 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. :)
Certainly. OTOH how often is it that such an operation is truly
isolated? In a website, as I do, such a rename likely goes with the
modification of links, that work would be reverted as well. And
while a rename probably is one of the more drastic operations I
frequently have to do a variety of edits, covering larger numbers of
files and yet belonging together in one commit. Doing this per
scripts gives me both more convenient means of testing and the
opportunity of trying again much easier in the worst case of one
step having gone completely wrong. It all depends ...
Jan Hendrik
---------------------------------------
Freedom quote:
Obsessed by their hatred and floundering in illogicality,
these dupes forget that the United States, acting in her
own self-interest, is also acting in the interest of us Europeans
and in the interests of many other countries,
threatened, or already subverted and ruined, by terrorism.
-- Jean-François Revel, Anti-Americanism (2002)
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1019386
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: svn rename glob?
Posted by Toby Thain <to...@telegraphics.com.au>.
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@subversion.tigris.org].
>>>>>
>>>>>
>>>> ------------------------------------------------------
>>>> http://subversion.tigris.org/ds/viewMessage.do?
>>>> dsForumId=1065&dsMess
>>>> ageId=1016795
>>>>
>>>> To unsubscribe from this discussion, e-mail:
>>>> [users-unsubscribe@subversion.tigris.org].
>>>>
>>>>
>>>>
>>>>
>>> ------------------------------------------------------
>>> http://subversion.tigris.org/ds/viewMessage.do?
>>> dsForumId=1065&dsMessag
>>> eId=1017206
>>>
>>> To unsubscribe from this discussion, e-mail:
>>> [users-unsubscribe@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@subversion.tigris.org].
>>
>>
>>
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?
> dsForumId=1065&dsMessageId=1019009
>
> To unsubscribe from this discussion, e-mail: [users-
> unsubscribe@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1019320
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: svn rename glob?
Posted by Steve Cohen <sc...@javactivity.org>.
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.
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.
>
> 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@subversion.tigris.org].
>>>>
>>>>
>>> ------------------------------------------------------
>>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMess
>>> ageId=1016795
>>>
>>> To unsubscribe from this discussion, e-mail:
>>> [users-unsubscribe@subversion.tigris.org].
>>>
>>>
>>>
>>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessag
>> eId=1017206
>>
>> To unsubscribe from this discussion, e-mail:
>> [users-unsubscribe@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@subversion.tigris.org].
>
>
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1019009
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: svn rename glob?
Posted by Toby Thain <to...@telegraphics.com.au>.
On 12-Jan-09, at 9:54 AM, Reedick, Andrew wrote:
>> -----Original Message-----
>> From: Jan Hendrik [mailto:list.jan.hendrik@gmail.com]
>> ...
>>
>>>>
>>>> $ find . -name \*.c |perl -n -e 'chomp; m/^(.*)\.[^\/]*$/ &&
> system
>>>> ("svn mv $_ $1.cpp")'
>>>>
>>>>
>
>
> ...
>
> 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).
>
Quite so, I was going to mention this in a followup but felt it was
too obvious.
--Toby
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1024864
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: svn rename glob?
Posted by "Reedick, Andrew" <jr...@ATT.COM>.
> -----Original Message-----
> From: Jan Hendrik [mailto:list.jan.hendrik@gmail.com]
> Sent: Monday, January 12, 2009 4:13 AM
> To: users@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@subversion.tigris.org].
Re: svn rename glob?
Posted by Jan Hendrik <li...@gmail.com>.
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.
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@subversion.tigris.org].
> >>
> >
> > ------------------------------------------------------
> > http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMess
> > ageId=1016795
> >
> > To unsubscribe from this discussion, e-mail:
> > [users-unsubscribe@subversion.tigris.org].
> >
> >
> >
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessag
> eId=1017206
>
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe@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@subversion.tigris.org].
Re: svn rename glob?
Posted by Steve Cohen <sc...@javactivity.org>.
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!
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@subversion.tigris.org].
>>
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1016795
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
>
>
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1017206
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: svn rename glob?
Posted by Toby Thain <to...@telegraphics.com.au>.
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@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1016795
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: svn rename glob?
Posted by Helge Kruse <He...@gmx.net>.
Use the "svn rename" command recursive. For example to rename all .cpp files to .cxx files you use this command:
for /R . %f in (*.cpp) do svn rename %f %~dpnf.cxx
Helge
----- Original Message -----
From: "Steve Cohen" <sc...@javactivity.org>
To: <us...@subversion.tigris.org>
Sent: Saturday, January 10, 2009 9:50 PM
Subject: svn rename glob?
>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?
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1015782
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1016941
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: svn rename glob?
Posted by Helge Kruse <He...@gmx.net>.
----- Original Message -----
From: "Steve Cohen" <sc...@javactivity.org>
To: <us...@subversion.tigris.org>
Sent: Saturday, January 10, 2009 9:50 PM
Subject: svn rename glob?
>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?
Use the "svn rename" command recursive. For example to rename all .cpp
files to .cxx files you use this command:
for /R . %f in (*.cpp) do svn rename %f %~dpnf.cxx
Helge
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1018801
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: svn rename glob?
Posted by Jan Hendrik <li...@gmail.com>.
Concerning svn rename glob?
Steve Cohen wrote on 10 Jan 2009, 14:50, at least in part:
> 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?
I may have missed something in the past, too, but what I do is run
a Perl (or Python) script with the respective file pattern set over the
working copy, writing the appropriate svn commandline for each hit
into a batch file, then (after checking everything looks all right) run
the latter and proceed with commit as usual.
I suppose with the Perl (or Python) bindings this could be done
more elegantly and natively, but so far this was sufficient for me.
Contact me offlist if you want the script as a starter (nothing
special about it).
Jan Hendrik
---------------------------------------
Freedom quote:
Freedom suppressed and again regained bites
with keener fangs than freedom never endangered.
-- Marcus Tullius Cicero
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1015811
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].