SVN Hoops


A little over a week ago I was working on a project updating some code, and ran into an issue once it came time to commit my code changes to the SVN repository that I had been using. Well after messing with authentication errors for a while and scratching my head I realized that the repository URL had changed from an HTTPS:// address to an HTTP:// address. It ended up being because the account holder for the repository had changed their account plan and downgraded their account to the point where SSL support was not included in their plan. That was great for them, but that meant I was having problems updating the code. I did a little digging and found a solution.

You can change the URL of an SVN repository and relocate it to a different url using the SVN command line tools.

svn switch --relocate  <from URL> <to URL>

That was great once I found out how to change the URL, but then when it came time to use my fancy little GUI SVN client I got rejected again because my command line SVN client just so happened to be running a newer version of SVN (1.6) and the fancy little GUI (Cornerstone) only supported up to v1.5 and refused to work with my working copy since it had been automatically upgraded to v1.6 by my command line client when I did the relocate. So then I got to dig a little bit more.

I found some references to being able to downgrade a working copy of a repository from version 1.5 to version 1.4 from when v1.5 was introduced. It referenced a little Python script tool (change-svn-wc-format.py) that could be used in downgrading a working copy. There was a little bit more information about the tool in a FAQ. I ended up downloading the script and using it to convert the repository from v1.6 to v1.5 and then my SVN GUI client was able to function again and I was able to commit my changes.

Now, about a week later (today) I go in and make a tiny 2 line code change and go to commit it to the same repository… only to find out that it has changed yet again. Apparently the account holder upgraded their account back to where SSL support was provided, and that ended up breaking connecting without SSL over HTTP. I recognized the problem a little quicker this time, and knew what needed to be done, so I found out how to relocate the SVN working copy, and thankfully last week Cornerstone got an upgrade that now supports v1.6 so I didn’t have to go through another downgrade in order to get my commit back up. Maybe now it won’t change again, or maybe I’ll just get better at learning how to adapt when the powers that be make decisions that make my life more difficult.

  1. #1 by Erik Hansen - October 5th, 2009 at 21:44

    Thanks for the info! I have wondered how I would change the repo location if I ever had to move a repo to a different SVN hosting platform.

    Btw, I owned Cornerstone and used it for a few months, but I’ve now switched to Versions as it’s much faster than Cornerstone, and I can actually see what it’s doing through it’s “Transcript”.

(will not be published)
  1. No trackbacks yet.