So you want to check out webkit to do some hacking. If you already tried this, you know that the test cases folder is enormous.
Not enormous solely by its size (which may be somewhat tolerable), but by amount of files in there. That’s absolutely preposterous. I think that the ratio when I last canceled the checkout was something like 15mb of content versus 75mb of disk space usage. I think I used FAT back then. That means 60mb went just to store information about files. (These sizes of course do not ignore the duplicates in the .svn folders.)
It’s completely irresponsible that someone put those in the project root, where nearly all the subfolders are essential except those test cases.
So if we just want to try out stuff and play around without running test cases ourselves, we don’t want to check out this enormous folder and get stuck on this for half an hour, an hour, two or even more. Here comes svn’s –depth parameter. UPDATE: Note! You will want to double-check that when you copy paste the command line from this site, there is actually two dashes before “depth”. I’ve noticed that during copy-paste, they were replaced by a single line.
$ svn co http://svn.webkit.org/repository/webkit/trunk webkit --depth immediates $ cd webkit $ for i in `ls -d */ | sed 's/\///g' | grep -v Tests`; do cd "$i" ; svn update --set-depth infinity; cd .. ; done
- So, we checkout only immediate children-files for webkit and put them in webkit subdirectory.
- Then we list only directories, (ls -d */) and remove all the appended slashes (sed ‘s/\///g’). We have one directory per line now. Finally we get only lines that do NOT include word Tests (grep -v Tests).
- Finally, we enter each directory, and tell svn to update, but now with infinite depth.
Updated on Aug 22 2012, primarily to update formatting.
–
via blog.vucica.net