Photos:

China pictures processed

 
0%
 
2008.01.05 @12:37 

Subversion url change

Subversion url change

What if my repository has changed its url ?

Forget svn switch it will only work if the domain name has changed (and yes especially if you used --relocate)

You can checkout again. Yes, but what if you changed some of the files and didnt want to commit them ? And you dont want to check out again 350 MB of data ?

The documentation refers to a perl script. Well if like me you're allergic to perl and/or dont have it installed then under any version of linux you can find you should be able to do this in a "one-line" command.
 
Go at the top of your project then:
 
 
Pay attention to the intentionnally missing trailing slash in both urls above. To test the command please remove the mv part or redirect to another file.

Special attention for lucas.

3 Comments
  1. Will said:

    Wednesday, October 21, 2009 at 19:33

    Thanks :) That really helped.

  2. Jorge Pereira said:

    Friday, January 22, 2010 at 15:20

    Thanks! But the other way and fast is. find /your/path -name entries -type f -exec sed 's@https://svn.oldserver.com@https://svn.newserver.com@g' -i {} \;

  3. Archange said:

    Friday, January 22, 2010 at 16:20

    You're right. It could be actually easier to use since escaping the slashes in my method is quite painful and not error-prone. With sed (but you need sed) at least it is clearer. I'll probably send an update to my team, we are actually moving repositories around. Thx !

Post a Comment
Comments have been deactivated thanx to screwers.