Recipe: Creating an SVN project

While there are plenty of tips in the wild how to add a project to an existing SVN repository, I have my own peculiar way to bootstrap one. Say, for moving my topic map knowledge base to SVN.

Let's assume I had a tree already:

ls knowledge/

map1.atm
map2.atm
...

Move that out of the way:

mv knowledge knowledge.orig

Create the local SVN infrastructure:

mkdir -p knowledge/{tags,branches,trunk}

Yes, bash can do that. Really.

Copy now any relevant content into the trunk

cp -r knowledge.orig/* knowledge/trunk/

Import that into the SVN repository:

svn import knowledge svn+ssh://me@myserver.org/var/apps/svn/knowledge -m "Import"

Move the local copies out of the way:

mv knowledge knowledge.orig /tmp

And check out the project again:

svn checkout svn+ssh://me@myserver.org/var/apps/svn/knowledge/trunk
mv trunk/ knowledge

Lest I forget.

Posted In

Why use svn when you can

Why use svn when you can have git?

GS

Anonymous (not verified) | Tue, 09/30/2008 - 15:23

Re: Why use svn when you can

Why use svn when you can have git?

Why use git when you can buy Microsoft tools?

Not sure where this is going.

rho | Sun, 08/30/2009 - 08:24