Something I have wanted to do for a long time is figure out how to export just the changed files between revisions of a SVN repository. To be honest I have searched for this functionality for a while now, probably over a year, and I never could find anything simple and easy that I could use. With exception of Tortoise SVN which is only for windows.
But today just now all that changed. I found this great little bash script on Interspire’s Developer Network.
Here is the nice gem of code:
for i in $(svn diff --summarize -r 1403:1438 http://server/svn/project/trunk |
awk '{ print $2 }'); do p=$(echo $i | sed -e 's{http://server/svn/project/trunk/{{');
mkdir -p $(dirname $p); svn export $i $p; done
I know not very exciting to most folks but a real great find to me and probably my customers too.
PS: Be looking out for diff downloads in our next release.
