This is an old revision of the document!
Table of Contents
DRAFT - How to submit patches to Mantis
You have identified a bug in a Mantis, and you have developed a solution to correct the defect. So, how do you submit that solution, for inclusion in Mantis?
By following the guidelines set out below, you will give your solution its best chance of being adopted, in a timely fashion.
Base your work on the most current source code
Please be sure to base your patch upon the most recent code in our CVS. This ensures you will be able to properly test your modifications and provide a cleanly applicable patch.
To get the most current Mantis sources use:
- For the first checkout
cvs -d:pserver:anonymous@mantisbt.cvs.sourceforge.net:/cvsroot/mantisbt login cvs -z3 -d:pserver:anonymous@mantisbt.cvs.sourceforge.net:/cvsroot/mantisbt co -P mantisbt
- After the first checkout (run this from the
mantisbt
directory)
cvs update -dP
Please refer to the Mantis page on sourceforge for more detailed instructions on how to access CVS.
modify and test sources
Now you are all set-up to make you modifications to sources. Please be sure to:
- Follow the Coding guidelines when modifying source code.
- Separate each logical change into its own patch. The rule of thumb is: one patch for one thing
- test the resulting sources to ensure you patch does what it is supposed to, possibly without breaking other stuff ;)
generate patch file
Once the modifications are done, you are ready to generate a patch file. This is usually as simple as:
cvs diff -u > mypatch.patch
from the mantisbt
directory (requires an active internet connection)
If your modifications also includes added files, please add the -N
option like:
cvs diff -uN > mypatch.patch
attach to bug report
Now that you patch file is ready, all is left to do is attaching the patch to the issue you are fixing. Since the patch should be reviewed by a Mantis developer, it will help if you also inform the mantisbt-devel mailing list about the available fix.
Posts on that list from non-subscribers are possible through services like GMANE
Thank you for reading this document – we look forward to your patches!