Project

General

Profile

Patch » History » Version 8

Lorenzo Meneghetti, 2024-10-19 17:01

1 1 Eric Davis
h1. Patch
2
3
A patch file is a single file that will list all the changes made to Redmine.  It is the preferred way to create and share changes to Redmine.
4
5
h2. Creating a patch file
6
7
Creating a patch for Redmine is easy.  Just follow the following simple steps:
8
9
# Download the development copy of Redmine
10
# _Make your changes_
11 6 Lorenzo Meneghetti
# Run @svn diff > PATCH_NAME.diff@ in you Redmine folder (if using git run @git diff > PATCH_NAME.diff@). Change PATCH_NAME to something that describes the purpose.
12 1 Eric Davis
# Upload the patch file to an issue and share
13 2 Eric Davis
14
h2. Applying a patch file
15
16
To apply a patch file you can use the "patch":http://www.gnu.org/software/patch/ program.
17
18 3 Olafur Gislason
# Change into your Redmine directory (the one with app, test, and config folders)
19 7 Lorenzo Meneghetti
# Run @patch -p0 < PATCH_NAME.diff@ (if using git run @git apply PATCH_NAME.diff@)
20 2 Eric Davis
# Check the messages for any errors.
21
22
Some errors might occur because there are changes to the same areas of code.  If you are familiar with merging code, you can try to merge the changes.  Otherwise post for help where you downloaded the patch or in the forums.
23
24
h2. Remove a patch file
25
26
To remove a patch file you can use the "patch":http://www.gnu.org/software/patch/ program.
27
28 3 Olafur Gislason
# Change into your Redmine directory (the one with app, test, and config folders)
29 8 Lorenzo Meneghetti
# Run @patch -p0 -R < PATCH_NAME.diff@ (if using git run @git apply -R PATCH_NAME.diff@)
30 2 Eric Davis
# Check the messages for any errors.