You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Srdan Dukic <sr...@gmail.com> on 2011/09/20 06:48:41 UTC

Deleting a directory with a space in it.

Hi,

I've got a directory in subversion with a space in the name which I'd like
to delete. This is what I've tried:

svn rm http://subversion/src/Repo/Grad Training
svn rm "http://subversion/src/Repo/Grad Training"
svn rm "http://subversion/src/Repo/Grad%20Training"
svn rm http://subversion/src/Repo/Grad%20Training
svn rm http://subversion/src/Repo/Grad\ Training
svn rm "http://subversion/src/Repo/Grad\ Training"

and I keep getting:

svn: URL 'http://subversion/src/Repo/Grad%2520Training' does not exist
svn: Your commit message was left in a temporary file:
svn:    'svn-commit.9.tmp'

I've also tried checking out the parent directory, deleting the directory
and committing the changes, but I get a permission error:

error: you don't have enough permissions for this transaction:
you can't remove Grad Training/

and from the Apache logs:

[Tue Sep 20 16:28:00 2011] [error] [client 192.168.1.70] Could not MERGE
resource "/src/Repo/!svn/act/9f05c85e-f478-4f0e-8d08-d06b5c3d8781" into
"/src/Repo".  [409, #0]
[Tue Sep 20 16:28:00 2011] [error] [client 192.168.1.70] Commit blocked by
pre-commit hook (exit code 1) with output:\nerror: you don't have enough
permissions for this transaction:\nyou can't remove Grad Training/\n  [409,
#165001]

How do you delete directories with a space in subversion? The version of the
client I am running is:

# svn --version
svn, version 1.6.11 (r934486)
   compiled May 31 2011, 05:46:33

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (
http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using
Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

Thank you

-- 
Srđan Đukić

Re: Deleting a directory with a space in it.

Posted by Daniel Shahaf <da...@elego.de>.
Fixed in 1.6.12 according to CHANGES.

Srdan Dukic wrote on Wed, Sep 21, 2011 at 09:10:58 +1200:
> On 21 September 2011 08:53, Stephen Butler <sb...@elego.de> wrote:
> 
> >
> >
> > No, you can delete (on the command line) directly in the repository
> > by escaping each " " in the URL with "\ " or "%20".
> >
> >
> This is what I've tried:
> 
> svn rm http://subversion/src/Repo/Grad Training
> svn rm "http://subversion/src/Repo/Grad Training"
> svn rm "http://subversion/src/Repo/Grad%20Training"
> svn rm http://subversion/src/Repo/Grad%20Training
> svn rm http://subversion/src/Repo/Grad\ Training
> svn rm "http://subversion/src/Repo/Grad\ Training"
> 
> and I keep getting:
> 
> svn: URL 'http://subversion/src/Repo/Grad%2520Training' does not exist
> svn: Your commit message was left in a temporary file:
> svn:    'svn-commit.9.tmp'
> 
> It seems like it's first escaping the space, making it %20 and then it's
> escaping this again to make it %2520. ('%' = '%25' URL encoded).
> 
> Cheers
> -- 
> Srđan Đukić

Re: Deleting a directory with a space in it.

Posted by Srdan Dukic <sr...@gmail.com>.
On 21 September 2011 08:53, Stephen Butler <sb...@elego.de> wrote:

>
>
> No, you can delete (on the command line) directly in the repository
> by escaping each " " in the URL with "\ " or "%20".
>
>
This is what I've tried:

svn rm http://subversion/src/Repo/Grad Training
svn rm "http://subversion/src/Repo/Grad Training"
svn rm "http://subversion/src/Repo/Grad%20Training"
svn rm http://subversion/src/Repo/Grad%20Training
svn rm http://subversion/src/Repo/Grad\ Training
svn rm "http://subversion/src/Repo/Grad\ Training"

and I keep getting:

svn: URL 'http://subversion/src/Repo/Grad%2520Training' does not exist
svn: Your commit message was left in a temporary file:
svn:    'svn-commit.9.tmp'

It seems like it's first escaping the space, making it %20 and then it's
escaping this again to make it %2520. ('%' = '%25' URL encoded).

Cheers
-- 
Srđan Đukić

Re: Deleting a directory with a space in it.

Posted by Stephen Butler <sb...@elego.de>.
On Sep 20, 2011, at 22:05 , Srdan Dukic wrote:

> On 20 September 2011 17:48, Lorenz <lo...@yahoo.com> wrote:
> Srdan Dukic wrote:
> 
> I don't think you have a problem with spaces here.
> 
> 
> So, just to confirm, ignoring the permissions issues, the only way to delete a directory with a space in it in Subversion 1.6 is to check out the parent folder, delete the directory in your working copy and commit the changes?


No, you can delete (on the command line) directly in the repository
by escaping each " " in the URL with "\ " or "%20".


Regards,
Steve

--
Stephen Butler | Senior Consultant
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
tel: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194



Re: Deleting a directory with a space in it.

Posted by Srdan Dukic <sr...@gmail.com>.
On 20 September 2011 17:48, Lorenz <lo...@yahoo.com> wrote:

> Srdan Dukic wrote:
>
> I don't think you have a problem with spaces here.
>
>
So, just to confirm, ignoring the permissions issues, the only way to delete
a directory with a space in it in Subversion 1.6 is to check out the parent
folder, delete the directory in your working copy and commit the changes?

-- 
Srđan Đukić

Re: Deleting a directory with a space in it.

Posted by Lorenz <lo...@yahoo.com>.
Srdan Dukic wrote:

I don't think you have a problem with spaces here.

>[...]
>error: you don't have enough permissions for this transaction:
>you can't remove Grad Training/

you should quote the complete error message because the "Commit
blocked by ..." part is essential here


>and from the Apache logs:
>[...]
>[Tue Sep 20 16:28:00 2011] [error] [client 192.168.1.70] Commit blocked by
>pre-commit hook (exit code 1) with output:\nerror: you don't have enough
>permissions for this transaction:\nyou can't remove Grad Training/\n  [409,
>#165001]

the operation is clearly prohibited by a pre-commit hook script on the
server. You will need to talk to the person who put it there.
-- 

Lorenz