-
Notifications
You must be signed in to change notification settings - Fork 301
Expand file tree
/
Copy pathpatch.apt
More file actions
60 lines (44 loc) · 2.03 KB
/
Copy pathpatch.apt
File metadata and controls
60 lines (44 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
How To Create and Submit a Patch
---
Stefan Reuter
---
$Id$
How To Create and Submit a Patch
This documents how to create and submit patches for Asterisk-Java.
* Introduction
A patch is exactly what the word says: a small piece of code used to
repair a breach. It is normally a plain text file containing only
the differences between the current version of the code and the
fixed version.
Often patches are also used to submit enhancements.
* Generating a Patch
The preferred way of creating a patch is to create it against latest
development branch. This ensures that the patch works with the latest
version of the source code and makes it easier to apply the patch.
To generate the patch you need to check out a copy of the source code
from SVN. Look a the {{{cvs-usage.html}CVS Howto}} for
the details.
After you have made the changes to the source code and
made sure it compiles and works as expected, you can create the
patch file using the command
+-----------------------------------------+
svn diff > /path/to/patchfile.patch
+-----------------------------------------+
If you do not have access to SVN you can generate the patch against
the latest release.
To generate the patch you will need two copies of the source code:
one that is unmodified and one containing your changes to the source.
Start by downloading the source code of the latest release, extract
it and make a copy of the entire source directory. After you have
made your changes to one of the source directories and made sure it
compiles and works as expected, you can create the patch file using
the command
+-----------------------------------------+
diff -ru /path/to/unmodified/source /path/to/modified/source > /path/to/patchfile.patch
+-----------------------------------------+
* Sending a Patch
The preferred way to submit a patch is via the
{{{http://jira.reucon.com/browse/AJ}Bug Tracker}}.
The patch can be reviewed there in public and other suggestions
can be discussed.