Why patching?
The Las Venturas Playground Head Developers noticed that quite a lot of commits where faulty. Varying from not compiling at all (Shame on you!) or just major bugs after compiling, which simply means no testing.
Our goal is to keep the trunk folder as "clean" as possible, ideally this should mean: compilable at any moment, without errors.
Since we see that this is currently not the case, we decided to revoke commit access for developers until they have proven that they can keep up to this standard.
Creating a patch
Do a SVN checkout as normal, edit your files as usual. And compile, as always...
And test if the code actually works, as you should do.
At this point you are ready to create a patch, being a .patch or .diff file.
Right-click on your main SVN folder, select TortoiseSVN > Create Patch.
![[Image: patch01.png]](http://sa-mp.nl/images/patch01.png)
Select the files you want to include in this patch. By default TortoiseSVN will select all the changed SVN files.
Optional: Show unversioned files
You need this option if you created new files which aren't on the SVN yet.
Save the file in the patches\ folder under your own username. You should name the files YYYYmmdd_revx. (For example: 20100824_rev1)
After saving the patch, TortoiseSVN will automatically open TortoiseDiff and shows the content of the patch file.
Once the patch-file is saved, you can commit this patch.
Right-click on your main SVN folder, select SVN Commit.
Only select the patch file and commit this file. De-select every other file, you can't commit them anyway.
![[Image: patch02.png]](http://sa-mp.nl/images/patch02.png)
Applying a patch
This part is mainly for the LVP Head Developers and LVP Developers with full SVN write access. For read-only developers this part could be useful to update your source with a not yet approved code from another read-only developer.
Right-click on your main SVN folder > TortoiseSVN > Apply patch. Open the patch file from the patches sub folder.
Double click on the filename in the left window. TortoiseMerge will show the original file in the left pane, and the changes in the right pane.
After reviewing the changes from every file, you can decide to accept all changes, or only the selected changes.
If you select the option Patch all, all changes in all the patched files are applied, not only the currently opened file. The option Patch selected will surprisingly only apply the selected line(s).
Once the patch is applied it can be committed like every other commit.
The Las Venturas Playground Head Developers noticed that quite a lot of commits where faulty. Varying from not compiling at all (Shame on you!) or just major bugs after compiling, which simply means no testing.
Our goal is to keep the trunk folder as "clean" as possible, ideally this should mean: compilable at any moment, without errors.
Since we see that this is currently not the case, we decided to revoke commit access for developers until they have proven that they can keep up to this standard.
Creating a patch
Do a SVN checkout as normal, edit your files as usual. And compile, as always...
And test if the code actually works, as you should do.
At this point you are ready to create a patch, being a .patch or .diff file.
Right-click on your main SVN folder, select TortoiseSVN > Create Patch.
![[Image: patch01.png]](http://sa-mp.nl/images/patch01.png)
Select the files you want to include in this patch. By default TortoiseSVN will select all the changed SVN files.
Optional: Show unversioned files
You need this option if you created new files which aren't on the SVN yet.
Save the file in the patches\ folder under your own username. You should name the files YYYYmmdd_revx. (For example: 20100824_rev1)
After saving the patch, TortoiseSVN will automatically open TortoiseDiff and shows the content of the patch file.
Once the patch-file is saved, you can commit this patch.
Right-click on your main SVN folder, select SVN Commit.
Only select the patch file and commit this file. De-select every other file, you can't commit them anyway.
![[Image: patch02.png]](http://sa-mp.nl/images/patch02.png)
Applying a patch
This part is mainly for the LVP Head Developers and LVP Developers with full SVN write access. For read-only developers this part could be useful to update your source with a not yet approved code from another read-only developer.
Right-click on your main SVN folder > TortoiseSVN > Apply patch. Open the patch file from the patches sub folder.
Double click on the filename in the left window. TortoiseMerge will show the original file in the left pane, and the changes in the right pane.
After reviewing the changes from every file, you can decide to accept all changes, or only the selected changes.
If you select the option Patch all, all changes in all the patched files are applied, not only the currently opened file. The option Patch selected will surprisingly only apply the selected line(s).
Once the patch is applied it can be committed like every other commit.
