Does anyone know how to export only the changed files from two tags using svn?
Lets say I have tag 1.0 and then later fix bugs in the trunk. Next I am ready for a new
svn diff can create a diff representing the changes between to tags. You can apply that diff with the patch utility.
http://svnbook.red-bean.com/en/1.0/re09.html
We needed something like this too. So I wrote a small java tool.
Hope it's useful to someone: github svn-diff-export
Based on Stefan's idea:
REV=123456
URL=https://...
BASEDIR=some_dir
svn diff --summarize -c $REV $URL | while read A B; do
svn cat -r $REV $B > ${B##*$BASEDIR}
done
This is my solution for TortoiseSVN:
What ends up exported is all the files you need to write over the top of an existing export in order to update it (no messing around applying diffs). Useful, for example, for updating websites by FTP.
The only caveat is that it obviously won't handle deleted files. Although it will at least tell you which files need to be deleted manually.
Using TortoiseSVN, right-click on your working folder and select “Show Log” from the TortoiseSVN menu.
Click the revision that was last published (#85 in this example)
Ctrl+Click the HEAD revision (or whatever revision you want to release ie #178) so that both the old and the new revisions are highlighted.
Right-click on either of the highlighted revisions and select “Compare revisions.” This will open a dialog window that lists all new/modified files.
Select all files from this list (Ctrl+a) then right-click on the highlighted files and select “Export selection to…”
Source: http://www.verysimple.com/blog/2007/09/06/using-tortoisesvn-to-export-only-newmodified-files/
svn diff --summarize url/to/tag1.0 url/to/tag1.1
will give you a list of files that changed between those two tags. You should be able to parse that list in a script and export each file individually with either
svn export url/to/file filepath
or
svn cat url/to/file > file
If you're using TortoiseSVN: