How to create trunk directory in existing svn repo without a trunk, and move all files to new trunk?

Posted by stupakov on Stack Overflow See other posts from Stack Overflow or by stupakov
Published on 2010-06-18T04:32:18Z Indexed on 2010/06/18 4:43 UTC
Read the original article Hit count: 372

Filed under:

Hi all,

I've got an svn repo with no trunk dir. I'd like to create the trunk and branches dirs, and move all my files (currently in the root) into trunk.

Creating trunk works just fine:

macbook[601]  # svn mkdir trunk
A         trunk
macbook[602]  # svn commit trunk
Adding         trunk
Committed revision 67.

moving everything into trunk fails:

macbook[604] # svn move * trunk
svn: Cannot copy path 'trunk' into its own child 'trunk/trunk'

is there a way to do this without giving it all the file and dir names individually? There are threads describing how to do this with TortoiseSVN, but i'd like to know the right way to do it with the svn commandline.

Thanks.

© Stack Overflow or respective owner

Related posts about svn