Assembla Subversion Repository moving code to trunk

A colleague set up a new subversion repository on assembla and invited me in. Unfortunately he missed importing the code into the trunk directory and as a result all the code was out in the root of the repo.

A bit of googling gave the solution at http://svn.haxx.se/users/archive-2007-10/0600.shtml

Simply put

cd ~/localdir
svn checkout https://path/to/assembla/repo localdir
cd localdir
svn mkdir trunk
for f in *; do svn mv $f trunk; done
svn mkdir branches tags
svn commit -m 'Finally got organized'