0

My Subversion repository name has & in it. I get an error while checking it out. Is there a workaround?

svn co https://ssss.my.com/D&G/
OPTIONS of https://ssss.my.com/D&G/ 200 OK
g2mk
  • 1,428
  • 12
  • 15
  • Try using `\&` instead of `&` – DavidPostill Jan 14 '16 at 18:20
  • I tried all options %26, & & and \& as you suggest. \& returns could not open the requested file system. I wonder if this is something with my apache config. – Dhiren Ghelani Jan 14 '16 at 18:39
  • Do you own and control the repository? Are there other users, or just you? If you are the only user then concider changing the name of the repository. Say: `https://ssss.my.com/DnG/` – user2121874 Jan 14 '16 at 19:30
  • For file protocol `svn info "file:///d:/repo/D&G"` is working fine. Try to `svn info "https://ssss.my.com/D&G/"` – Y.N Jan 15 '16 at 09:04
  • `svn info "https://ssss.my.com/D&G/"` does not work for me. what's your version of svn client? – Dhiren Ghelani Jan 15 '16 at 10:52
  • i tried only file:// now, and i'll try https// later. svn is 1.8 – Y.N Jan 15 '16 at 12:14
  • I could not create the D&G repo with Visual SVN Server. Do you have the published one? – Y.N Jan 15 '16 at 17:46

4 Answers4

0

As DavidPostil suggested in a comment what you need to do is "escape" the & character. SVN usually supports %-codes in URLS, from experience urls containing spaces will get converted to %20 characters.

The %-code for & (ampersand) is %26 so try the command:

svn co https://ssss.my.com/D%26G/ 
Mokubai
  • 89,133
  • 25
  • 207
  • 233
0

Do you own and control the repository? Are there other users, or just you? If you are the only user then concider changing the name of the repository. Say: https://ssss.my.com/DnG/

Alternatively:

ssh root@ssss.my.com

### Just trying to make it explicit that you need to cd to the directory above "D&G"
cd /path/to/svn/repository/D\&G/ && cd ..

ln -s D/&G DnG

### Now, if necessary, edit your apache configuration so that the DnG softlink gets served up to https://ssss.my.com/DnG/
user2121874
  • 180
  • 8
  • yes, I own svn and can change it but it is linked to so many other systems that refer to D&G. the links break. I put in a process so new repositories dont have characters like & but need to get to the bottom of why svn co does not like & – Dhiren Ghelani Jan 15 '16 at 10:48
  • Does the `&` break things on all of those other systems configured to use `D&G`? If not, and you are only having trouble doing a local checkout, then my solution will still work around your issue. Since you are just creating a symbolic link that points `DnG` --> `D&G`, your other systems can still continue to use `D&G` while you use `DnG`. Both point at the same repository, so it won't matter which one you use. – user2121874 Jan 15 '16 at 18:56
0

I could not find the official doc for repository naming conventions, but all tested http(s) svn servers allow only alpha, nums, dash and underscore chars in repo name.

I think using of & char in repo name is incorrect.

But you can use the & in folders path in your repo.

Y.N
  • 141
  • 1
  • 6
-2

The usage of '%26' instead of special character '&' solves the problem.

  • 2
    Welcome to SuperUser! Your post doesn't appear to address the question in a useful manner. This is an old post with various answers and one of those proposed the same answer as you and it didn't work . You will find that you will have a better experience if you take moment to take the SuperUser [tour] and review site guidelines on [ask] and [answer]. If you follow the norms of the SuperUser community and approach it with an attitude of helping others too, it will serve you well. – Rey Juna Mar 16 '19 at 18:34
  • I do not think it is that simple. It is best to avoid special characters instead. – Dhiren Ghelani Mar 22 '19 at 15:36