Submitting patches

When you find and fix a bug in the Diablo source code, or when you add new functionality to Diablo, you can get your changes incorporated in the next Diablo release by submitting a patch.

Before we explain how to do so, some important points:

  • First of all, Diablo is GPL, so all patches to Diablo need also be GPL. If you want to get your patch accepted, you must allow that your code will be released as GPL.
  • Second, if that is no problem, make sure that your code compiles correctly when applied on a (fairly) recent version of Diabl
  • Third, we use GNU coding standards. If your not familiar with these standards please read http://www.gnu.org/prep/standards. Your code must follow these standards, even in new files.

Creating the patch:

if your working on cvs type:

cvs diff -3cp [modified files] > mypatch.patch

in the root of the cvs repository.

The 3cp option makes the patch more readable.

(in the future we will probably use svn, then the command will be:

svn diff --diff-cmd diff --extensions "-cp" [modified files]

)

Next, write a changelog entry. Changelog entries should have the format:

2048-08-16  John Doe  <john.doe@theweb>
       * [modified files]: Description of your changes

Now you are ready to send your patch to the diablo mailing list.
Put the changelog entry at the start of your mail and append your patch to it.