简体   繁体   中英

svn cannot access URL with a @ in it

I used PyCharm to rename a branch of my project: I asked to rename my branch v4.0.0 to v5.0.0 and I do not know why, but PyCham added a @ in the destination name. I got this:

svn ls svn+ssh://svn@devhost/myproject/branches/
v2.0.0/
v3.0.0/
v5.0.0@/   <----

Now if I try to list files in this branch I get:

svn ls svn+ssh://svn@devhost/myproject/branches/v5.0.0@/
svn: warning: W160013: URL 'svn+ssh://svn@devhost/myproject/branches/v5.0.0' non-existent in revision 15667
svn: E200009: Could not list all targets because some targets don't exist

I tried without the @ , or with a %40 instead: I have the same message. I tried the -r <some revision> option to see whether it is a revision problem, but it did not help. I tried to use PyCharm again to rename v5.0.0@ to v5.0.0 : it tells I cannot rename to itself. I tried to use PyCharm again to rename v5.0.0@ to v4.0.0 : it renamed that v4.0.0@ with a @ again.

The funny thing is that pycharm is still able to brower inside svn+ssh://svn@devhost/myproject/branches/v5.0.0@/

On my terminal, the svn ls does not work, the svn co also ! I cannot create a working copy myself !

The question: How can I rename branch v5.0.0@ to v5.0.0 ?

As you know the @ means "peg and operative revisions" in subversion - it's the reason of "unexpected" behavior. If you need use in filename you should double it:

svn ls svn+ssh://svn@devhost/myproject/branches/v5.0.0@@/
# or remove the @ char
svn mv svn+ssh://svn@devhost/myproject/branches/v5.0.0{@@,}/

See in the SVNbook 's Peg and Operative Revisions chapter:

This workaround even applies to paths that end in an at sign—you would use filename@@ to talk about a file named filename@ .

It works on working copy too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM