views:

164

answers:

2

I would like the move several directories in subversion under a new, parent directory. There is code out there that is in the process of being changed. Should I get the checkins done first, then try it? What's the best way to accomplish this?

A: 

I would check in first. I try to keep structural changes to my source tree (i.e. moving directory trees and the like) separate from functionality changes relating to the codebase (i.e changes within files), just to reduce possible problems with losing modifications during the transition. My mantra is little and often.

Brian Agnew
+1  A: 

I suppose you are using subclipse, the SVN plugin for eclipse.. however if the files are already synched you can just create the new folder structure, move everything as you like inside and then commit. It will delete old files and commit new ones!

Of course you will lose the revision numbers: every file will be at latest revision.

Jack
If you use the command line 'svn move' then history is maintained, I believe. I'd take the time to understand the command line SVN and preserve your history
Brian Agnew
How do you move the files? Under the svn Repositories tag, create directory, then drag and drop? I tried that, but nothing happens.
Jack BeNimble
Ok, I tried moving the directories using the turtle client. That seems to work ok - but - how to handle getting the directories moved within eclipese? Delete and a fresh checkout?
Jack BeNimble
Don't move or copy the directories in Package explorer or Navigator. It will move/copy the .svn subdirectories as well and subversion will get very confused.
Ludwig Weinzierl
Usually if you modify it outside eclipse and u commit changes is always useful to do a fresh checkout.. however I was talking of moving them directly dragging them from project outline in eclipse (as you do normally also for unsynched projects)..
Jack
Jack - thanks, sounds good. How do you create the new directory in project explorer? File > new folder? Then drag and drop the project into it, then commit?
Jack BeNimble