last week I set up my git-svn repos for gsoc, and at first all seemed well. but a few days later, svn decided it wasn’t going to update until it had reclaimed the folders I had converted to git. :P silly svn.
see, I have kdelibs and kdebase checked out from svn, but kdelibs/plasma and kdebase/workspace/plasma are git repositories now. svn didn’t like this. I talked to a guy in #svn who insisted this couldn’t be done and I should give the folder back to svn. I wasn’t going to give up so easily, so I talked things over in #kde-devel… there was this –set-depth and –depth thing in svn update, but the documentation was brief and confusing, so that day I settled on having a separate plasma-git folder and editing cmakelists to compile that instead of plasma.
I wasn’t quite happy with this duplication, though, and something in the back of my mind kept coming back to this depth thing… yesterday I had an idea for how I might be able to use it, and today I googled for more information on the flag, and found it, and tested it, and it *does* behave the way I want. :) in fact it’s slightly easier than I expected.
so here’s how you turn kdelibs/plasma into a git repo without breaking svn for the rest of kdelibs:
mv plasma plasma-svn; #do check for uncommitted data before deleting it
svn up --depth=empty plasma;
now svn will ignore plasma (and plasma-svn unless you explicitly update that). if you don’t have a gitsvn repo yet you can create it in there (git svn clone, if you use a revision # it must be one that touched that part of svn). if you’ve already got a git repo started, you can move it in like so:
mv plasma/.svn plasma-git/;
mv plasma-git plasma
and from then on, you’ll have a hybrid repository. svn up will happily ignore plasma, so remember to git svn rebase it after you svn up. :)