开发者

Using svn delete in a URL with space character

I' trying to remove a file in a remote repository with a space character.

svn delete -m "Deleting file" "https://svn.xyz.edu/applications/workshop/H Y P W 2011_2.pdf"

I get the error

svn: URL 'https://svn.xyz.edu/applications/workshop/H%2520Y%2520P%2520W%25202011_2.pdf' does not exist

How to r开发者_如何学编程esolve this problem and delete the file?


For some reason it appears to be trying to double URI encode the URL. It changes the space to %20, then changes the % to its encoded value %25, giving you %2520.

Try putting the %20 in there yourself:

svn delete -m "Deleting file" "https://svn.xyz.edu/applications/workshop/H%20Y%20P%20W%202011_2.pdf"


If you are using TortoiseSVN, please use Delete command in local, then commit to SVN. I tried in my side, it's working.


Yeah, this is a really old question but this bit me today, so here's the answer.

You may be tripping over bug #3636 in subversion, which was fixed in subversion 1.6.12

So upgrade subversion to 6.1.12 or better if you're on an old version.

Can't upgrade for some reason ? All is not lost. You can rename the directory so it has no spaces and then delete that directory

svn mv "https://svn.xyz.edu/url with spaces" https://svn.xyz.edu/urlwithoutspaces -m "subversion issue #3636"

svn delete https://svn.xyz.edu/urlwithoutspaces


Try:

svn delete -m "Deleting file" "https://svn.xyz.edu/applications/workshop/H%20Y%20P%20W%202011_2.pdf"

which will URL encode the spaces properly.


Try manually inserting the encoded space character:

H+Y+P+W+2011_2.pdf

or

H%20Y%20P%20W%202011_2.pdf


why don't you check out the repo and commit the delete?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜