开发者

Extracting the modified files from SVN

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 di开发者_Python百科rectory 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!


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.


Subversive plugin for Eclipse has Extract feature, which does exactly what you want.


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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜