At work we've got a number of large projects that have a considerable number of very large binary resources that we manage under source control with SVN.
The problem we have is that some of the legacy projects have resource in folders underneath the code base rather than outside of the code base. This makes it difficult to update just the code from an export of a tag. This is exacerbated by the fact that the large resources are binary, so we can't patch using an svn diff.
For some time now I've been looking for a means to get a diff, pick up the files that have changed or added and export only those files into an appropriate directory structure that I can easily drop into place.
I finally have one!
I'm not sure how I haven't found this StackOverflow post previously, but find it I did.
On this post were a couple of different solutions. Most of them involve tortoiseSVN, which I detest for the number of times its destroyed working copies for me in the past. (It may be better now but I don't care it will never be installed on my computer ever!)
A chap called Phil Gloyne posted a jar file that he created to address this same issue. Unfortunately when I tried it out it seemed to blow up on the authentication and I couldn't easily work out what the problem was.
A frenchman by the name of Julien Falconnet posted a bash script that he'd created. This almost did what I wanted it to do, but is set to export the difference between specific revisions.
What I really needed was to export difference between two tags or urls in the repository rather two revisions, so I tweaked it to use URLs rather than revisions in the svn diff. This almost worked, but while spotted a flaw in the script when using two urls. Using only one url and revisions, the url in the summarized svn diff are the correct url to export from. When you use two urls the url in the summary are those of the OLD url and not the new url, so when the script exports the files, it gets the revision from the old url and fails to get file that have been added since the old tag was created.
Fortunately for me, Julien had already pulled the relative file path in order to build the correct file structure when exporting the files, so it was a simple matter to switch the export to use the new url with the relative file path instead of the one in the diff.
I am now a very happy man! A considerable weight and arduous task has now been lifted from my shoulders! A 15 minute task is now a 30second one. I hope it makes someone else out there very happy too.
Incidentally, should you still wish to use this script to export between revisions use the url form for revisions of svn diff OLD-URL[@OLDREV] NEW-URL[@NEWREV
NOTE : The bash script can be downloaded using the download button just below.