Howto submit patches

From S1MP3 Wiki
Jump to: navigation, search

This document will guide both Windows and Linux users to make and send patches for the s1mp3.org project. If you haven't got the sources yet, check the instructions to download source from the SVN repository. If you have any doubts, please, ask on IRC at #s1mp3 on irc.freenode.net or at the mailing list

Submitting your patch

The maintainers and people working on the module are responsible by guaranteeing that the patch isn't dangerous (asking for tests and so), and that it complies with our Code conventions, before applying it to the repository. The preferable way to submit patches is via Trac.

Via Trac

To submit your patch file on Trac, you need a ticket. Be sure to search for an existing ticket for your issue before creating a new ticket. If one doesn’t exist, create a ticket and explain the problem as clearly as possible. When you have a ticket, click Attach File and attach your patch file.

Via mail list

Compose an email explaining the problem as clearly as possible, and attach your patch file on the message.

Making a patch file

Update your source - otherwise you might end up patching already fixed bugs back into source.

On Windows

Subversion has integrated merge features. All you need to do is right-click on the s1mp3 root folder and select SVN Update. If any of the files you edited come up as conflicted (in red in the list), you will need to merge them by hand in the tool provided when you double-click on the list item.

Create a patch - This is easy. Right-click on the s1mp3 root folder and select Tortoise SVN - Create Patch. A dialog appears to allow you to select the files you want to include in the patch. Check the files you want to include, then save the patch file. If I’m patching one file, I’ll usually use the full name of the file followed by “.diff”, for example, "loadram.c.diff".

On Linux

  • Update your source: svn update
  • (todo: explain how to merge conflicts)
  • Generate the path : svn diff > patch_filename

Hints to modify files

Feel free to modify the code, using Code conventions as reference. If you wish, you can easily revert your changes to the last checkout version:

  • On Windows: Right-click on the file, choose Tortoise SVN, Revert.
  • On Linux : svn revert <filename>

On Windows, you should be able to see where you’ve made changes to the source by looking at the icon for the 1000 folder/file. The ones that are changed will likely be red.

Similar pages