How do i go about making a patch so that my code changes are added swiftly and easily?
More over, if I have some changes to my copy of the source i wish to leave out of the patch can i exclude those easily?
Thanks in advance
Edit: maybe make this a sticky i'm sure others would like to know
Making patches
Moderator: Moderators
-
- Spring Developer
- Posts: 374
- Joined: 14 Mar 2005, 12:32
For that you need an SVN client. For Windows you can get TortoiseSVN ( http://tortoisesvn.tigris.org/ ).
Once you have TortoiseSVN installed, check out the SVN repository. For the complete repository url check this page: http://developer.berlios.de/svn/?group_id=4358 .
After you checked out you can modify the source, and then use the "make patch" command of TortoiseSVN. Shouldn't be that hard :-).
If you don't know how to check out a repository or to make a patch with TortoiseSVN I suggest you take a look at the TortoiseSVN docs: http://tortoisesvn.sourceforge.net/?q=support .
Btw I'm a Windows user, so I can't give any specific tips for linux. But AFAIK you can just use the "svn" command with appropiate switches on linux.
Once you have TortoiseSVN installed, check out the SVN repository. For the complete repository url check this page: http://developer.berlios.de/svn/?group_id=4358 .
After you checked out you can modify the source, and then use the "make patch" command of TortoiseSVN. Shouldn't be that hard :-).
If you don't know how to check out a repository or to make a patch with TortoiseSVN I suggest you take a look at the TortoiseSVN docs: http://tortoisesvn.sourceforge.net/?q=support .
Btw I'm a Windows user, so I can't give any specific tips for linux. But AFAIK you can just use the "svn" command with appropiate switches on linux.
On linux w/ commandline svn you'd do svn diff > mypatch.diff.
As for removing parts, I believe w/ Tortoise you can select which files you want to include in patch. If you want to exclude part of the diff of one file, it is possible to edit the created .patch or .diff file, but be sure to:
As for removing parts, I believe w/ Tortoise you can select which files you want to include in patch. If you want to exclude part of the diff of one file, it is possible to edit the created .patch or .diff file, but be sure to:
- You test the edited patch afterwards to see if it still applies (make a clean checkout and choose apply patch or on linux patch -p0 < mypatch.diff (possible different number behind -p, read manpage for that).
- You only remove entire hunks at once. A hunk is a @@...@@ line with anything following it till just below the next @@..@@ line or the next +++/--- line pair.
- You do only edit the lines prefixed with + inside the hunks.
- You do not add anything, not a single line to the patch.