I am working a project that does not have a trunk / branches / tags directory structure – ie. everything is in the root of the svn repo.
I would like to create a trunk directory and in the root directory, and move everything in the root directory into the new trunk directory.
What is the best way to do this?
The first thing I considered was
svn mkdir trunk (for each file or directory that is not called trunk: ) svn mv FILEorDIR trunk/
But this effectively deletes every file and then adds it again. Is there a better way?
Thanks.
This is similar to the way I’ve done it in the past. Your solution actually copies each file, then deletes the original. Because of the way Subversion implements copies, the history for every file is preserved.
After doing this, you can point existing checkouts at the new location using
svn switch.