Patch Submission Format
Moderator: Forum Moderators
-
- Code Contributor
- Posts: 73
- Joined: February 15th, 2005, 1:36 am
- Location: Michigan, USA
- Contact:
Patch Submission Format
Are there specific guidelines anywhere on how to submit a patch? More specifically, on the format of the patch itself?
I've only submitted one patch, and it was about a year ago. I noticed that people were submitting patches as .diff files, so I read up on how to create .diff files and submitted my patch in that format. However, the process felt awkward and inelegant, and I don't think I did it quite right.
As such, I think it would be great if there was a sticky post in this forum detailing how to get a patch into the format the developers would prefer for submission.
Thanks in advance to anybody who can post this information.
I've only submitted one patch, and it was about a year ago. I noticed that people were submitting patches as .diff files, so I read up on how to create .diff files and submitted my patch in that format. However, the process felt awkward and inelegant, and I don't think I did it quite right.
As such, I think it would be great if there was a sticky post in this forum detailing how to get a patch into the format the developers would prefer for submission.
Thanks in advance to anybody who can post this information.
<rcarello>
good point, I'll post a couple of guidelines for patch submission, and make that topic sticky while I'm at it....
All patches should be submitted at patches.wesnoth.org
You can post them here too for discussion, but we need to track what is their status and p.w.o helps a lot
patch should be generated using "svn diff
SVN provides a cool command to generate diff, just run "svn diff >mypatch.patch" to create the patch, and its all nice and ready
it even records precisely the commit against which it was generated, it makes things really easy for us...
Dont forget to add an entry to the Changelog
Add yourself in about.cfg
including your name and/or nick it makes it easier for us.
new contributors should go in the contributor section of the about file
when changing WML, please add a pointer in the wiki to where it should be updated when commited
be patient, sometime we are not very responsive
don't be suprised if we discuss the patch a lot
thus, you should leave us a way to contact you, either a forum nick, an email adress, or submit with a registered gna account.
we try as much as possible to apply patch "as is" which means that we will usually ask you to change a patch rather than changing it ourselves...
The patch should generate no warnings
wesnoth has a large number of warnings enabled, all of them are usefull, if your code spits warning, please have a look, and ask yourself why you are doing what causes the warning.
When adding a file, don't forget src/Makefile.am, src/SConscript, src/CMakeLists.txt, projectfiles/VC9/wesnoth.vcproj
it makes things simpler for us, and is often forgotten
sometime patches are rejected, don't be suprised if it happens
that's all for the moment, we'll probably add some more later[/b]
All patches should be submitted at patches.wesnoth.org
You can post them here too for discussion, but we need to track what is their status and p.w.o helps a lot
patch should be generated using "svn diff
SVN provides a cool command to generate diff, just run "svn diff >mypatch.patch" to create the patch, and its all nice and ready
it even records precisely the commit against which it was generated, it makes things really easy for us...
Dont forget to add an entry to the Changelog
Add yourself in about.cfg
including your name and/or nick it makes it easier for us.
new contributors should go in the contributor section of the about file
when changing WML, please add a pointer in the wiki to where it should be updated when commited
be patient, sometime we are not very responsive
don't be suprised if we discuss the patch a lot
thus, you should leave us a way to contact you, either a forum nick, an email adress, or submit with a registered gna account.
we try as much as possible to apply patch "as is" which means that we will usually ask you to change a patch rather than changing it ourselves...
The patch should generate no warnings
wesnoth has a large number of warnings enabled, all of them are usefull, if your code spits warning, please have a look, and ask yourself why you are doing what causes the warning.
When adding a file, don't forget src/Makefile.am, src/SConscript, src/CMakeLists.txt, projectfiles/VC9/wesnoth.vcproj
it makes things simpler for us, and is often forgotten
sometime patches are rejected, don't be suprised if it happens
that's all for the moment, we'll probably add some more later[/b]
Last edited by Crab on September 12th, 2009, 10:42 pm, edited 1 time in total.
Reason: added note about projectfiles/VC9/wesnoth.vcproj
Reason: added note about projectfiles/VC9/wesnoth.vcproj
Fight key loggers: write some perl using vim
If you fix bugs you'll probably not add files but if you do you need to list the file(s) in src/Makefile.am for the build process to work.freecraft wrote:Sorry I don't understand this. Can you clarify that? What and when should I do with Makefile.am? I think I could fix some bugs ...Boucman wrote:When adding a file, don't forget Makefile.am
"If gameplay requires it, they can be made to live on Venus." -- scott
Re:
I have no idea what this means. Could somebody clarify it?Boucman wrote:patch should be generated using "svn diff
SVN provides a cool command to generate diff, just run "svn diff >mypatch.patch" to create the patch, and its all nice and ready
Sorta on a break from the forums ATM, have been for a while. If I was doing something for/with you and I haven't recently, that's why, I will be back soon hopefully.
Re: Patch Submission Format
did you use svn do do your checkout ? (get the source)
if yes, you should have a command line tool called "svn"
go into your terminal, run "svn diff" and redirect the output to a text file. that text file is what you should submit for inclusion
if yes, you should have a command line tool called "svn"
go into your terminal, run "svn diff" and redirect the output to a text file. that text file is what you should submit for inclusion
Fight key loggers: write some perl using vim
Re: Patch Submission Format
I don't know if I used svn. How do I tell? For that matter, what is svn?Boucman wrote:did you use svn do do your checkout ? (get the source)
if yes, you should have a command line tool called "svn"
go into your terminal, run "svn diff" and redirect the output to a text file. that text file is what you should submit for inclusion
And also, what do you mean by a command line tool?
Sorta on a break from the forums ATM, have been for a while. If I was doing something for/with you and I haven't recently, that's why, I will be back soon hopefully.
Re: Patch Submission Format
ok, all this stuff is for developers and code contributors... do you have modifications you want to contribute back (i.e code change in C++)
if no, you shouldn't concern yourself with patches...
if no, you shouldn't concern yourself with patches...
Fight key loggers: write some perl using vim
Re: Patch Submission Format
I was gonna do something with LUA. It's not finished yet though.
Sorta on a break from the forums ATM, have been for a while. If I was doing something for/with you and I haven't recently, that's why, I will be back soon hopefully.
-
- Posts: 6
- Joined: February 15th, 2013, 10:03 pm
Re: Patch Submission Format
Are patches still preferred in this format, or should we be submitting pull requests via GitHub now?
Re: Patch Submission Format
GitHub pull requests are the preferred method now,
still you can submit patches at gna.
still you can submit patches at gna.