Create a β€œpatch” between versions?

It seems that the SVN "patch" functionality is not quite what I want. I really want to make the difference between the versions. Thus, I would select rev1 and rev 2 and in the end be a folder containing all the files that have been changed or added between these versions.

Can this be done with Tortoise SVN or plain svn?

+18
svn diff tortoisesvn patch
Jan 24
source share
3 answers

This can be achieved in the SVN turtle itself. Right-click on the branch (folder) from which you want to create a patch β†’ Show Log β†’ Select All versions for which you need to create a patch β†’ Right-click and select Compare revisions β†’ This will show the modified files β†’ Select all files β†’ Click right-click and select Export Revision To β†’ Specify any path on your computer β†’ Files will be exported to the appropriate folder structure.

Alternatively, you can achieve this with scripts. To do this, refer to the following link:

http://www.electrictoolbox.com/subversion-export-changed-files-cli

+15
Jan 24 '14 at 6:11
source share

At the command line, you can do this as follows.

All files in a folder

Create a patch in your home folder containing all the changes between versions 123 and 124 of all the changed files in the my_project folder:

 svn diff -r123:124 path/to/my_project > ~/my_project_changes_123_124.patch 

One specific file

Create a patch in your home folder containing all the changes between versions 123 and 124 from only one file, the name is "my_project.php":

 svn diff -r123:124 path/to/my_project/my_project.php > ~/my_project_changes_123_124.patch 
+21
Aug 13 '14 at 9:49
source share

Um ... how about svn diff ? Just pass it the necessary changes.

http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.diff.html

In TortoiseSVN, if you highlight the changes you want in the "show log" dialog box, there is even a context menu item to display the changes as diff, which you can then save somewhere.

+3
Jan 24 '14 at 4:11
source share



All Articles