You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Stephen P Rufle <st...@cox.net> on 2011/03/09 22:22:14 UTC
Renaming a file on windows with @20 in name
I am trying the following.
svn ren "48@20hrs.jpg" "48 hrs.jpg"
I get the following message
svn: '48' is not under version control
I would like to automate the task of renaming ~100 files. I was able to
use TortoiseSVN to do a single file manually, but am not sure how to get
this to work from the command line.
Please help :)
Re: Renaming a file on windows with @20 in name
Posted by Stephen P Rufle <st...@cox.net>.
Thanks that did it. I had thought it might have had something to do with
peg revisions, but was unsure how to escape the syntax.
On 3/9/2011 6:00 PM, Ryan Schmidt wrote:
> On Mar 9, 2011, at 18:11, Michael Diers wrote:
>> On 2011-03-09 21:22, Stephen P Rufle wrote:
>>> I am trying the following.
>>> svn ren "48@20hrs.jpg" "48 hrs.jpg"
>>>
>>> I get the following message
>>> svn: '48' is not under version control
>>>
>>> I would like to automate the task of renaming ~100 files. I was able to
>>> use TortoiseSVN to do a single file manually, but am not sure how to get
>>> this to work from the command line.
>>>
>>> Please help :)
>>
>> Stephen,
>>
>> what command line interpreter (shell) are you using?
>>
>> The files to be renamed must be referred to with a trailing "@",
>> like so:
>>
>> svn ren "48@20hrs.jpg@" "48 hrs.jpg"
>
> And just to explain why: This is because Subversion reserves a special use for the @ character: specifying a peg revision number. (Peg and operative revisions are explained in the book at http://svnbook.org ) Subversion takes "48" as the filename and "20hrs.jpg" as the peg revision, and isn't smart enough to realize that that's not a valid revision number and just tries to use it as one anyway; to avoid that, you add the extra "@" at the end, which will end up using the correct filename "48@20hrs.jpg" and a revision number "" (the empty string), which is fine.
>
>
>
Re: Renaming a file on windows with @20 in name
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 9, 2011, at 18:11, Michael Diers wrote:
> On 2011-03-09 21:22, Stephen P Rufle wrote:
>> I am trying the following.
>> svn ren "48@20hrs.jpg" "48 hrs.jpg"
>>
>> I get the following message
>> svn: '48' is not under version control
>>
>> I would like to automate the task of renaming ~100 files. I was able to
>> use TortoiseSVN to do a single file manually, but am not sure how to get
>> this to work from the command line.
>>
>> Please help :)
>
> Stephen,
>
> what command line interpreter (shell) are you using?
>
> The files to be renamed must be referred to with a trailing "@",
> like so:
>
> svn ren "48@20hrs.jpg@" "48 hrs.jpg"
And just to explain why: This is because Subversion reserves a special use for the @ character: specifying a peg revision number. (Peg and operative revisions are explained in the book at http://svnbook.org ) Subversion takes "48" as the filename and "20hrs.jpg" as the peg revision, and isn't smart enough to realize that that's not a valid revision number and just tries to use it as one anyway; to avoid that, you add the extra "@" at the end, which will end up using the correct filename "48@20hrs.jpg" and a revision number "" (the empty string), which is fine.
Re: Renaming a file on windows with @20 in name
Posted by Michael Diers <md...@elego.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2011-03-09 21:22, Stephen P Rufle wrote:
> I am trying the following.
> svn ren "48@20hrs.jpg" "48 hrs.jpg"
>
> I get the following message
> svn: '48' is not under version control
>
> I would like to automate the task of renaming ~100 files. I was able to
> use TortoiseSVN to do a single file manually, but am not sure how to get
> this to work from the command line.
>
> Please help :)
Stephen,
what command line interpreter (shell) are you using?
The files to be renamed must be referred to with a trailing "@",
like so:
svn ren "48@20hrs.jpg@" "48 hrs.jpg"
- --
Michael Diers, elego Software Solutions GmbH, http://www.elego.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk14FzgACgkQcEKlWnqVgz3pQQCbBGxVnheQKn05V9SDT002spC1
mMcAnRdx4HIzWf7HMJa1wBj57ze82ntR
=MBGE
-----END PGP SIGNATURE-----