Business, Tech, Life, and Whatever else

SVN Export Just Changed Files

by Eric Barnes on June 30, 2009

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.

You May Also Be Interested In...

Coda 1.5 is out!
August 28, 2008

EE Tweet This
May 25, 2009

Moving To GitHub
October 29, 2009

New Home Office
January 5, 2010

Subscribe Now

If you enjoyed this post, you will definitely enjoy my others. Subscribe to the feed to get instantly updated for those awesome posts soon to come.


blog comments powered by Disqus