Does SVN create a patch from code?

Is it possible to create a patch (diff files) for all files that were affected during commit AFTER commit? These files will have the same version number, and I need diff of each file from their previous version.

+61
svn diff
Feb 22 '13 at 19:23
source share
3 answers

If you know the commit number, use

svn diff -c N path 

Where N is the commit number and path is the path to your working copy.

+53
Feb 22 '13 at 19:27
source share

If you know the version numbers (e.g. 123 and 124), you can use:

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

See also stack overflow.

+45
Aug 13 '14 at 9:57
source share

Alternative, when using windows + tortoiseSVN: go to the source directory, right-click the directory (to open the tortoise context menu) and select "Show Log", select both revisions (Ctrl-click), and then right-click and select "Show differences as a uniform difference" from the context menu. A window will appear showing the differences, which can then be saved as a patch.

Update: while holding Shift, when you click "Show differences as unified diff", a dialog box appears in which you can choose comparison options (ignore eol changes, ignore space changes, ignore all spaces). This is useful if, for example, line endings change between versions (otherwise the whole file will be displayed as β€œchanged”)

+36
Jul 06 '15 at 9:37
source share



All Articles