OmegaDelta.net

Hong Kong

SVN – partial checkouts

2010-02-20 14:51

I have a project setup like this:

trunk/Project1
trunk/Project2

I wanted to add a common library to both projects.  Turns out there is a really nice way of doing this.

Add the library to trunk/Library

Then do a selective checkout.  Simply check out the trunk using --depth=empty (docs).  Then in this directory (which is a working copy with a .svn), you “svn update” the various directories you do want.  In this case, ‘svn update Library’ and ‘svn update Project1′.  You now have a perfectly valid, single working copy with just the libraries you need.

SVN also now has relative externs (since 1.5) so you could extern to ../Library which then still plays nice when you branch the trunk.  Only catch – it’s still an extern which requires separate committing and merging.  Less than ideal.  Still is it a hell of a lot better than absolute externs which require updating every time you branch as well.  I went with the partial checkout solution above, I think it’s neater, but it is nice to have the choice now.

svn ignores from the command line

2009-07-06 03:50

so I’m stuck in OS X without my beloved tortoise…

recursively set ignores by command line:

svn propset -R svn:ignore ‘*.blar’ .

SVN Move in Tortoise

2009-04-30 08:08

When you right click a versioned file it appears that there is no move function. Well there is! Read about it here.

I agree it’s non-obvious. I understand they reason why they had to do it the way they did though – my suggestion? Put a stub “Move” command in the normal context menu, with a dialog explaining where to actually find it. My first assumption was simply that Tortoise hadn’t implemented it…

svn ignore

2009-02-09 16:56

how to add svn ignores from the command line