View Full Version : Relocate SVN folders
dmegatool
2008-05-06, 16:45
Hey there !
My company has moved so the svn isn't the same adresse anymore. Can you explain me how to move all the shit ? :)
I've found a way but I would have to edit all the "entries" file. There are no master folder that contain everything. Every projects has is own adresse so it's easier on the backup task. Can you help setup a automator task that would open all "entries" file, search 192.XXX.XXX.XXX, replace that with 192.YYY.YYY.YYY, save the file.
You're looking for 'svn switch --relocate'.
$ svn help sw
switch (sw): Update the working copy to a different URL.
usage: switch --relocate FROM TO [PATH...]
Rewrite working copy URL metadata to reflect a syntactic change only.
This is used when repository's root URL changes (such as a scheme
or hostname change) but your working copy still reflects the same
directory within the same repository.
dmegatool
2008-05-07, 07:38
Yeah I looked for that but I got a bunch of different addresses. Like 92.XXX.XXX.XXX/project1, 92.XXX.XXX.XXX/project2, ... So I would have to do it on every folder :\. No ?!?
Well, do you have a common hierarchy for the root of the repository? I.e., one with the address 92.XXX.XXX.XXX itself?
If so, you'd go there and type
svn sw --relocate 92.XXX.XXX.XXX SomeOtherAddress
It'll then recursively change everything in there.
dmegatool
2008-05-07, 08:41
Well, do you have a common hierarchy for the root of the repository? I.e., one with the address 92.XXX.XXX.XXX itself?No that's the problem. The root folder isn't a repository. Each project have it's own svn asdress.
Do you know any way to change the text in all the "entries" files ? I'm thinking about using Dreamweaver fonction of search and replace... Maybe I'll give it a try
Anyway thanks for your help. It's really appreciate... But you didn't find a solution so keep going ! :p
EDIT: Tried with dreamweaver. I can open the file but it says it's locked so it will open in read-only. Still, I can't manage to make search in the files as it's not reconized by default. I need to select --All Files (*.*)--
dmegatool
2008-05-07, 09:15
Anyway I tried a little bit the terminal way and I can't get it to work. Now I would mind doing the folders one by one ...
Let say my folder I would like to relocate is " /Users/MP/Documents/MySVNFolderHere/". Could you give me a example with like http://oldAdress and http://newAdress ?
(cd /Users/MP/Documents/MySVNFolderHere/; svn sw --relocate http://oldAdress http://newAdress)
dmegatool
2008-05-07, 10:02
Wow I don't know why i didn't figure out the cd thing. Too easy I guess.
Thank you Chucker. I'll do that folder by folder but hey! ... it's better than nothing :)
You're quite welcome. Good luck! :)
vBulletin® v3.6.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.