Setting up an svn repository

I always forget how to create an SVN repository so I'm documenting it here. It's not VisIt-related per-se but it does come in handy when working on small projects that use VisIt externally.

Make the repo

cd
mkdir myrepo
svnadmin create `pwd`/myrepo/

When sharing the repository with other users, you'll have to take precautions so file permissions don't bite you:

  • Do a recursive chmod/chgrp on your myrepo directory to open it up to users in a common group
  • You'll have to set the "sticky bit" on the myrepo directory to keep files created in it from being set to another user's permissions. If you don't do this then you'll end up with files you don't own in your repo and that can cause problems the next time you update or checkout.
cd
chgrp -R group myrepo
chmod g+rws myrepo   # I think this is how I did it...

Local checkout

cd
mkdir checkout
cd checkout
svn co file:///home/user/myrepo

Remote checkout

cd
mkdir checkout
cd checkout
svn co svn+ssh://user@host/home/user/myrepo

First commit

cd
cd checkout/myrepo
cp /some/Makefile .
svn add Makefile
svn commit