Sunday, December 07, 2008

The 'Branches/Tags/Trunk' Convention

Q. I have several projects under Subversion which do not adhere to the branches/tags/trunk convention. How do I move to this convention?

A. Check out each project and 'cd' to the local copy. Then:

mkdir branches tags trunk; svn add branches tags trunk
ls -A | egrep -v '\.svn|branches|tags|trunk' | xargs -I X svn move X trunk
svn commit -m "Moved to the 'branches/tags/trunk' convention."