What You Will Need Before Starting #
Applying a Patch With TortoiseSVN #
1. Downloading a Patch #
Part of the troubleshooting/testing process involves downloading and applying patches to your local WordPress trunk install from a Trac ticket that you are involved in.
To download a patch, right-click on the filename in the Attachments section of the ticket (just below the Description section), select Save Link As in the context menu, and save it to a folder called patches.
2. Applying A Patch #
To apply the patch you just downloaded, right-click in the folder for your working copy of WordPress, which will bring up a context menu. Click on SVN Apply Patch.
This will bring up a file open dialog window, allowing you to select the patch file to apply. By default, only .patch or .diff files are shown, but you can change the file type to All files if you don’t see the patch file you are looking for.
Applying a patch file to your working copy of WordPress should be done at the same folder level as was used to create the patch. If you are in the correct working copy, but picked the wrong folder level, TortoiseSVN will display a notice, suggesting the correct level, and allows you to select that.
Once you have selected the patch file and correct working copy location, TortoiseMerge will run to merge the changes from the patch file with your working copy. A small window lists the files which have been changed. Double-click each filename, review the changes, and save the patched file to your working copy.
Next Steps #
- Testing A Patch