Reputation: 4359
anyone knows if there's a way to extract from a SVN repository the modified files between two commits?
It would be useful to get the directory structure also..
I need to extract the files I've modified since the latest commit and send them to the client.. I've done this manually until now, but as the number of file grows, it begins to be quite time-consuming (and dummy, I think :)
I use the Cornerstone GUI, but obviously it would be ok from command line.. or maybe there's a GUI that does that on the Mac?
Thanks!
Upvotes: 3
Views: 2714
Reputation: 41
Subversive plugin for Eclipse has Extract
feature, which does exactly what you want.
Upvotes: 4
Reputation: 51
I'm using a shell script that get the list of files from SVN Log and then exports one by one. I'm still looking for another option using SVN client directly.
Upvotes: 1
Reputation: 15634
If the client is happy about using patch, the easiest way is to use svn diff
. If the revision you want to send to your client is r26, type
svn diff -c 26 > changes.diff
To send all changes in revisions 26–35, use
svn diff -r 26:35 > changes.diff
These will both create a file changes.diff
which you can send to your client, who then copies that file to the root of their copy of the code and runs
patch -p1 < changes.diff
This method also takes care of the directory structure for you.
This does have the additional disadvantage that new/deleted files won't be patched, and nor will binary files. As far as I know, there's no neat automated way of doing that.
Upvotes: 7
Reputation: 19612
Why don't you use 'svn update' on the client?
This implements retrieving a binary diff of the changed files (so exactly the information you ask for) and it applies it to your working copy too :)
Upvotes: 1
Reputation: 3843
I don't have a simple solution, but you might have a look at the subversion book, chapter 4, Copying Changes Between Branches - Chapter 4. Branching and Merging. There also some discussions about changesets.
Upvotes: 0