Patch Submission Format

Discussion and development of all aspects of the game, including AI improvements and new engines.

Moderators: Developers, Forum Moderators

Patch Submission Format

Postby rogue » February 22nd, 2006, 6:23 pm

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.
<rcarello>
rogue
Code & WML Contributor
 
Posts: 73
Joined: February 15th, 2005, 1:36 am
Location: Michigan, USA

Postby Boucman » February 22nd, 2006, 7:03 pm

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]
Last edited by Crab on September 12th, 2009, 10:42 pm, edited 1 time in total.
Reason: added note about projectfiles/VC9/wesnoth.vcproj
Fight key loggers: write some perl using vim
Boucman
Patch Monkey
 
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Postby freecraft » August 30th, 2006, 3:02 am

Boucman wrote:When adding a file, don't forget Makefile.am


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 ...
freecraft
 
Posts: 94
Joined: April 28th, 2005, 12:49 am
Location: Serbia

Postby Soliton » August 30th, 2006, 3:23 am

freecraft wrote:
Boucman wrote:When adding a file, don't forget Makefile.am


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 ...


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.
"If gameplay requires it, they can be made to live on Venus." -- scott
Soliton
Developer
 
Posts: 1514
Joined: April 5th, 2005, 3:25 pm
Location: #wesnoth-mp

Postby freecraft » August 30th, 2006, 8:57 pm

Ah now I understand. Thank you soliton :)
freecraft
 
Posts: 94
Joined: April 28th, 2005, 12:49 am
Location: Serbia

Re:

Postby TheScribe » July 16th, 2012, 12:40 pm

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

I have no idea what this means. Could somebody clarify it?
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.
User avatar
TheScribe
 
Posts: 465
Joined: June 17th, 2012, 8:17 pm
Location: You won't know till it's too late

Re: Patch Submission Format

Postby Boucman » July 17th, 2012, 7:21 am

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
Fight key loggers: write some perl using vim
Boucman
Patch Monkey
 
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: Patch Submission Format

Postby TheScribe » July 23rd, 2012, 9:12 pm

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


I don't know if I used svn. How do I tell? For that matter, what is svn?

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.
User avatar
TheScribe
 
Posts: 465
Joined: June 17th, 2012, 8:17 pm
Location: You won't know till it's too late

Re: Patch Submission Format

Postby Boucman » July 23rd, 2012, 9:55 pm

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...
Fight key loggers: write some perl using vim
Boucman
Patch Monkey
 
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: Patch Submission Format

Postby TheScribe » July 23rd, 2012, 10:50 pm

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.
User avatar
TheScribe
 
Posts: 465
Joined: June 17th, 2012, 8:17 pm
Location: You won't know till it's too late

Re: Patch Submission Format

Postby yieldthought » July 20th, 2013, 12:46 pm

Are patches still preferred in this format, or should we be submitting pull requests via GitHub now?
yieldthought
 
Posts: 3
Joined: February 15th, 2013, 10:03 pm

Re: Patch Submission Format

Postby fabi » July 20th, 2013, 4:10 pm

GitHub pull requests are the preferred method now,
still you can submit patches at gna.
fabi
Developer
 
Posts: 1117
Joined: March 21st, 2004, 2:42 pm
Location: Germany


Return to Coder’s Corner

Who is online

Users browsing this forum: No registered users and 1 guest