Have you ever tried working with a huge monolith of SVN repo that has lived for ages and seen a bazillion commits in its time? Then you might have experienced unpleasant times waiting for some process to chew through all that nasty pile of code.
Here is how I handle these behemoths – just checkout the subpath I need leaving all the history behind:
1 2 3 4 |
repopath=$1 folder=$2 lastrev=$(svn info $repopath | grep "Last Changed Rev:" | sed -e 's/.*: \(\d*\)/\1/') git svn clone -r $lastrev $repopath $folder |
This code snippet will fetch the latest revision the subpath was edited and do a sparse shallow checkout using git as client.