I want to apply a patch to this bug (http://code.djangoproject.com/ticket/13095) but I have never done it before and I have no idea where to begin. Can anyone point me to a tutorial?
On Linux/UNIX, you can use the patch
command for this.
It works in the following way:
cd /usr/lib.../site-packages/django/
patch --dry-run -p1 < ~/downloads/somefix.patch
The patch command looks in the file to find the proper files it needs to update.
The -p1
tells patch to ignore the first level of the folder mentioned in the patch file. Often this is the project name itself. The --dry-run
option prevents actual execution, so you can experiment with it.
When everything is allright, you can remove the --dry-run
option, and the actual patch will be applied.
On Windows, several tools (e.g. WinMerge / TortoiseMerge) have a "Apply patch" option in the menu, which will allow you to do the same thing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With