Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Ok, here is my issue. I created a repository long time ago when I was not familiar with administrating a subversion server. I knew that it would be a good idea to have a "trunk" folder to work in. So I created a folder like /home/svn/project/trunk but instead of creating the repository in /home/svn/project I created it in /home/svn/project/trunk and worked in that folder from that time on.

Now we have almost 1000 revisions in that wrong folder but we want to have a branches folder. So what can we do? The best would probably be moving all files into the /home/svn/project folder and that have then moved into the trunk folder. But I think that this will result in a delete and add action on all files and folders which will pretty much ruin the whole history and make a revert to a previous revision impossible.

Is there any chance of moving the files? Or is there at least the possibility to create a branches folder and use this folder?

share|improve this question
    
It is unclear whether your /home/svn/project is a Repository or a Working Copy. Please clarify. –  Turbo J Jun 2 '11 at 13:45
    
My /home/svn/project/trunk is a repository. It should be /home/svn/project so that is the issue I wanted to solve. –  Kau-Boy Jun 2 '11 at 15:42
add comment

1 Answer

up vote 1 down vote accepted

You can use svn mv ... to do the move. This will preserve file history.

But your devs may need to checkout again, as such a big change in directory layout is likely causing trouble with IDEs and other important things.

share|improve this answer
    
I don't know how the command should be. Can you please give me a full example. Let's assume I want to move it from /home/svn/project to /home/svn/project/trunk what would the command be? Or do I have to move it to a folder outside the repository and within another repository like /home/svn/new_project/trunk. All of my command I tried failed. –  Kau-Boy Jun 2 '11 at 12:21
    
It was very complicated but in the end it worked out. I've created the trunk folder inside the working copy and commited that new folder. Than I had to do a svn mv PER FILE AND FOLDER as the trunk cannot be moved into itself. Afterwards I commited the move actions. Than I was able to move the repository files from the fake trunk folder to its parent. That gave me the option to not change any setting on the clients as the still pointed to a trunk folder which was now a real repository directory. –  Kau-Boy Jun 2 '11 at 17:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.