Jacob Kaplan-Moss

SVN usability

I wrote this post in 2009, more than 14 years ago. It may be very out of date, partially or totally incorrect. I may even no longer agree with this, or might approach things differently if I wrote this post today. I rarely edit posts after writing them, but if I have there'll be a note at the bottom about what I changed and why. If something in this post is actively harmful or dangerous please get in touch and I'll fix it.

Okay, time to import this code into SVN. svn import, right? This should be easy!

svn import https://...../trunk/

Oh crap, that tried to import everything.

^C

Guess I’ll just set svn:ignore.

svn propset . svn:ignore
svn propset svn:ignore .
svn propedit svn:ignore
svn propedit svn:ignore .

Okay. Can’t do that on a non checkout. Fine.

cd ..
svn co https://...../trunk/ myproject.svn
cd myproject.svn/
mv ../myproject/* .

Right, okay. Add some files now.

svn add .
svn add *
svn st

D’oh, forgot to ignore again.

svn reset -R .
svn revert -R .
svn st
svn propedit svn:ignore .
svn st
svn add bootstrap.py buildout.cfg setup.py src/ README
svn st
svn ci

Crap. I forgot to ingore my .egg-info.

svn rm src/myproject.egg-info/
svn ci -am "Removed accidentally checked-in setuptools cruft."
svn ci -m "Removed accidentally checked-in setuptools cruft."
svn st

Hm. It’s still there.

svn st
svn propedit svn:ignore .
svn st
svn propedit svn:ignore .
svn st

Why. Won’t. You. Ignore. That. Directory!?

svn propedit svn:ignore .
svn st
ls src/
svn propedit svn:ignore .
svn st

Oooooh, I have to ignore it in src!

svn propedit svn:ignore src/
svn st
svn propedit svn:ignore .
svn st
svn ci -m "Updated svn:ingore"

WTF? Oh. Right.

svn up
svn ci -m "Updated svn:ingore"
svn st

(The above is taken, unedited except to change the name of the project, from my bash history.)