tags:

views:

291

answers:

3

Hi, 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!

A: 

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.

akr
Thanks, I'll have a look at that.
Flavio Copes
+4  A: 

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.

me_and
Thanks! I'll use this method, I think it's even better than re-creating the directory structure.
Flavio Copes
I've just updated my answer—I forgot to note that diff/patch won't update binary files for you.
me_and
+1  A: 

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 :)

Bert Huijben
Hi, thanks for the hint. Well, the SVN server is on my local machine. I work on a small part of the project, and the process I use is develop my part on localhost and then send the updates to the client.
Flavio Copes