2

Having asked this question and received a very satisfactory answer, I now wish in hindisght that I had made a different choice for the layout of my subversion repository.

My repo layout is currently:

/trunk
      /Project1
      /Project2
/branches
         /Project1
             /Branch1
             /Branch2
         /Project2
/tags
     /Project1
          /Tag1
          /Tag2
     /Project2

Of course now I wish I'd made the other decision:

/Project1
         /trunk
         /branches
         /tags
/Project2
         /trunk
         /branches
         /tags  

So the question now becomes: how can I make this transition, while keeping my version history intact? Is there a way of doing that?

Community
  • 1
  • 1
Tim Long
  • 13,508
  • 19
  • 79
  • 147

2 Answers2

4

You just have to do svn move Your history will remain intact, but of course, new revisions will be added for every move.

svn move http://server/repo/branches/Project1/ http://server/repo/Project1/branches/Branch1 -m "Moving branch1 of project1"

The above is server side move ( rename )

http://svnbook.red-bean.com/en/1.4/svn.ref.svn.c.move.html

manojlds
  • 290,304
  • 63
  • 469
  • 417
  • 3
    That would certainly work, I'd want to automate it though (lots of projects). What I really wanted though, is a way to take the repository apart and put it back together again _as if it had always had the new layout_. Perhaps that is asking too much. – Tim Long May 07 '11 at 14:10
  • I'm accepting this answer, but it didn't really answer my question completely. For the record, the reason I wanted to do this was because we use an analysis tool that doesn't really understand moves too well. In other words, I wanted no record of the moves. – Tim Long Nov 09 '11 at 22:49
1

Yes. Use svn move (or svn rename)

S.Lott
  • 384,516
  • 81
  • 508
  • 779