less than 1 minute read

I sometimes want to checkout only files that changed between two revisions in Subversion.

A simple shell command can do that easily for me.

1
2
3
4
5
for i in $(svn diff --summarize -r 1403:1438 http:/svn.example.com/svn/project/trunk | awk '{ print $2 }'); do
	p=\$\(echo \$i | sed -e 's#http://svn.example.com/svn/project/trunk##');
	mkdir -p $(dirname $p);
	svn export $i $p;
done