| 93 | |
| 94 | === How can I apply a fix from a particular ticket? === #afix |
| 95 | |
| 96 | Sometimes you see a ticket has been closed, and you want to incorporate that fix, but this fix is not yet contained in the latest release and will only be available in the next release. In this case you have two options: |
| 97 | |
| 98 | '''Option 1)''' Switch to using the SVN version instead of release version. This is recommended for ''stable'' branch, for example the 1.x branch, because a) you will then always get the latest fixes, and b) it makes it easier to sync with the latest source. The ''stable'' branch should be as good as release version because changes are normally restricted to bug fixes only. |
| 99 | |
| 100 | '''Option 2)''' Apply the ticket manually by following the steps below. Note that this may not be easy since a fix may depend on other fixes, and is probably not even feasible if the version that you have is too old. |
| 101 | a. Open the Trac ticket. For example, let's open #1364 |
| 102 | a. Look in the '''Change-History''' section, and note '''all''' the ''changesets'' that have been applied for this ticket. |
| 103 | - There are two in the #1364 sample, i.e. [3743] and [3746] |
| 104 | - Changeset may be shown using ''[NNN]'' or ''rNNN'' format, e.g. [3743] or r3743. They are the same. |
| 105 | a. Open each changeset and download the '''raw''' patch by scrolling to the bottom of the changeset and click ''Download in other formats --> Unified diff''. |
| 106 | a. Apply '''each''' of the raw patch to your local pjsip copy, '''in order''' (low number first): |
| 107 | - For example: |
| 108 | {{{ |
| 109 | $ cd /path/to/your/pjsip |
| 110 | $ patch -p4 --dry-run < changeset_r3743.diff |
| 111 | }}} |
| 112 | - You will need to adjust the number in "-p" option. See ''patch'' manual. |
| 113 | - '''Don't forget''' to remove ''--dry-run'' option once you're happy with the patch test. |
| 114 | - Don't forget to apply the remaining patches, if any. |