wiki:DevelopersGuide/PatchGuide

Patch Guidelines

As an open source project JOSM is coded and maintained by volunteers in their spare time. You too are very welcome to contribute to the development. — You have improved the JOSM code and you'd like to share the changes with the community? The following guidelines provide hints to make the integration as smooth as possible.

  • Use the command svn diff or the tools of your IDE, to create a patch file in unified format rather than sending us complete .java files.
    • If you can't use svn, at least use unified diff format "diff -u oldfile newfile".
  • In order to submit the patch either open a new ticket or choose an existing one that the patch addresses. Then attach the file (use the .diff or .patch file extension). Put the term [PATCH] in the subject line of the ticket so that it is displayed in the list of pending patches.
  • Remember to "svn add" new files.
  • Do not zip your patch file.
  • If you would like to add more than 2-3 images, attach them in a zip archive. Tell us where the images should be copied.
  • Even if you changed only a single file create the patch from the root folder of the JOSM source repository.
  • Keep the patch as readable as possible: Do not correct the formatting / indentation of any code that need not be changed. Do not unnecessarily reorder methods, etc. (Improvements to the documentation are always welcome, though.)
  • Changeset sizes:
    • If you have multiple related changes, it is usually better to combine them all into one big patch, rather than attaching a long list of diffs. However, sometimes it may be useful to split the more controversial parts of the changes from those that can be applied without discussion. This applies to very large patches as well: If there is a lot of technical rework required it can be a good idea to separate this from the interesting new code. This should make it easier to understand and discuss the important parts of your patch.

Please be patient — there can be various reasons why your patch is not dealt with right away. If you don't get any reaction for two weeks, it may be a good idea to bring the topic up again and ask for a status update.


Back to Developers Guide

Last modified 2 years ago Last modified on 2014-12-08T13:43:39+01:00