Relocating a subversion repository
Posted October 30, 2008 at 10:10pm in Programming
Usually when a URL of one of my repositories changes I either have all of my code checked in so I can grab a fresh copy or I am on a Windows machine and I can do it quickly in TortoiseSVN. Tonight I was working with a local repository (file://) and both it and the working copy had been on a Linux laptop so the location of the repository was a bit different and I had code that was not checked in before the move. So I was going from file:///home/user/repos/xyz to file:///Users/user/Repos/xyz and here is the command that allowed me to change the repository URL and commit my code.
svn switch --relocate file:///home/user/repos/xyz file:///Users/user/Repos/xyz
Then you can run your commit command or update command and all is well.
