You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Russell E Glaue <rg...@cait.org> on 2010/06/03 21:58:23 UTC

How to delete directory with at symbol in the name

If you accidentally put the at symbol in a directory name like this:

svn copy http://svn.domain.com/repos/trunk/mydir@49 http://svn.domain.com/repos
/trunk/mydir@HEAD -m "bring back rev 49 from the dead"

You end up with the following path in HEAD: '/trunk/mydir@HEAD/'
Where '@HEAD' is part of the actual directory name.

How would you delete this 'mydir@HEAD' directory?

Using svn delete mydir\@HEAD or mydir&#64;HEAD do not work.
Any help?

-RG

Re: How to delete directory with at symbol in the name

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Jun 04, 2010 at 11:24:37AM +0200, Stefan Sperling wrote:
> On Thu, Jun 03, 2010 at 04:58:23PM -0500, Russell E Glaue wrote:
> > If you accidentally put the at symbol in a directory name like this:
> > 
> > svn copy http://svn.domain.com/repos/trunk/mydir@49 http://svn.domain.com/repos
> j> /trunk/mydir@HEAD -m "bring back rev 49 from the dead"
> > 
> > You end up with the following path in HEAD: '/trunk/mydir@HEAD/'
> > Where '@HEAD' is part of the actual directory name.
> 
> Which version of Subversion were you using?
> I bet this copy won't produce the same result with 1.6.5 or greater.

Hmmm... I was wrong about that.

With a trunk build of svn the problem still exists:

$ svn cp ^/trunk/epsilon@2 ^/trunk/epsilon3@HEAD -m copy

Committed revision 4.
$ svn up
A    epsilon3@HEAD
A    epsilon3@HEAD/zeta

The '@' in the copy target path is used literally. This needs to be fixed.

Thanks,
Stefan

Re: How to delete directory with at symbol in the name

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Jun 04, 2010 at 04:35:24AM -0500, Ryan Schmidt wrote:
> I reproduced Russell's problem using Subversion 1.6.11 on Mac OS X 10.6.3 (svn copying to "mydir@HEAD" did create an item in the repo called "mydir@HEAD")

I've filed an issue: http://subversion.tigris.org/issues/show_bug.cgi?id=3651

Thanks,
Stefan

Re: How to delete directory with at symbol in the name

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 4, 2010, at 04:24, Stefan Sperling wrote:
> On Thu, Jun 03, 2010 at 04:58:23PM -0500, Russell E Glaue wrote:
>> If you accidentally put the at symbol in a directory name like this:
>> 
>> svn copy http://svn.domain.com/repos/trunk/mydir@49 http://svn.domain.com/repos
>> /trunk/mydir@HEAD -m "bring back rev 49 from the dead"
>> 
>> You end up with the following path in HEAD: '/trunk/mydir@HEAD/'
>> Where '@HEAD' is part of the actual directory name.
> 
> Which version of Subversion were you using?
> I bet this copy won't produce the same result with 1.6.5 or greater.
> 
> The @ character within the basename of a path is always special to svn.
> It means "what follows is a peg revision".
> See http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html
> 
> Contrary to what the book describes, versions of Subversion before 1.6.5
> were inconsistent about parsing peg revisions on the command line.
> In your case, the copy command did not treat the @ in a special way,
> but the delete command did.
> In 1.6.5 this was fixed so that all commands treat the @ in a special way.

I reproduced Russell's problem using Subversion 1.6.11 on Mac OS X 10.6.3 (svn copying to "mydir@HEAD" did create an item in the repo called "mydir@HEAD"), and using "svn rm mydir@HEAD@" allowed him to remove the offending item.


Re: How to delete directory with at symbol in the name

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Jun 03, 2010 at 04:58:23PM -0500, Russell E Glaue wrote:
> If you accidentally put the at symbol in a directory name like this:
> 
> svn copy http://svn.domain.com/repos/trunk/mydir@49 http://svn.domain.com/repos
j> /trunk/mydir@HEAD -m "bring back rev 49 from the dead"
> 
> You end up with the following path in HEAD: '/trunk/mydir@HEAD/'
> Where '@HEAD' is part of the actual directory name.

Which version of Subversion were you using?
I bet this copy won't produce the same result with 1.6.5 or greater.

The @ character within the basename of a path is always special to svn.
It means "what follows is a peg revision".
See http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html

Contrary to what the book describes, versions of Subversion before 1.6.5
were inconsistent about parsing peg revisions on the command line.
In your case, the copy command did not treat the @ in a special way,
but the delete command did.
In 1.6.5 this was fixed so that all commands treat the @ in a special way.

Stefan

Re: How to delete directory with at symbol in the name

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 3, 2010, at 16:58, Russell E Glaue wrote:

> If you accidentally put the at symbol in a directory name like this:
> 
> svn copy http://svn.domain.com/repos/trunk/mydir@49 http://svn.domain.com/repos
> /trunk/mydir@HEAD -m "bring back rev 49 from the dead"
> 
> You end up with the following path in HEAD: '/trunk/mydir@HEAD/'
> Where '@HEAD' is part of the actual directory name.
> 
> How would you delete this 'mydir@HEAD' directory?
> 
> Using svn delete mydir\@HEAD or mydir&#64;HEAD do not work.

svn delete mydir@HEAD@