How do I apply a diff patch on Windows?
Apply Patch
With TortoiseMerge:
- Find and open an existing SVN repo directory
- Create a new directory named "merges", if it does not exist already
- Copy the file onto which you want to apply the .patch file
- ADD and COMMIT to the svn repository before you continue to the next step
- Right click on merges and choose Apply patch...
- Double click the file from list
- The patched file with diff is displayed on the right pane
- Click on that pane and hit Save or export with File->Save As...
Alternative screeny if you Open from TortoiseMerge. In the screeny below, directory refers to the "merges" directory mentioned at step 2 above:
Screenshot of WinMerge GUI:
I made pure Python tool just for that. It has predictable cross-platform behavior. Although it doesn't create new files (at the time of writing this) and lacks a GUI, it can be used as a library to create graphic tool.
UPDATE: It should be more convenient to use it if you have Python installed.
pip install patchpython -m patch
TortoiseMerge is a separate utility that comes bundled with TortoiseSVN.
It can also be can be downloaded separately in the TortoiseDiff.zip archive. This will allow you to apply unified diffs to non-versioned files.