views:

223

answers:

1

I have inherited a subversion repo which looks like this:

https://foo/product/src

I want to make it more like:

  • https://foo/product/trunk/src
  • https://foo/product/tags
  • https://foo/product/branches

Will moving ./src to ./trunk/src retain history ? I also want to make sure the other developers don't curse me for doing this .. are there unintended consequences from doing this ? I want the developers to just do a simple repo directory relocate.

Thanks

+5  A: 

Yes, doing a move operation in Subversion will retain all history of the affected files. After doing this move, each developer will have to run a svn switch command to point their working copies to the new location of src. You should coordinate this with the other developers and ensure that nobody has any pending changes in their working copy, as those would be annoying to clean up later.

If you want to experiment with this, I would recommend doing a dump and restore into a new repository, so you can experiment in a sandbox without any possibiliy of affecting others. Then you can do the move and ensure that all the history is retained, and also update a test working copy so you can make sure the svn switch does what you expect.

Greg Hewgill
svn switch will work on the local copy even if it has local changes, and commit will fail until the switch has been made.I suggest to do the svn move with url's, and not on a working copy though.
Czimi