Website Downloads Documentation Knowledgebase Wiki Issue tracker Commercial support

Contributor/Committer tips

Coding style

Without getting religious about coding style guidelines, it is pleasant and productive if all code follows more or less the same style. Basically, just do the same as the current sources, and follow the standard Java conventions (ClassNamesLikeThis, static finals in uppercase, etc). Opening braces are on the same line. Use some whitespace, e.g. write x = 5 + 3, not x=5+3.

One special point that requires attention: use spaces for indentation, do not use tabs. For Java sources, we use 4 spaces, for XML 2 spaces.

For Javascript, please follow the Dojo style guide (at the time of this writing, most Javascript in Daisy is a pretty unstructured set of functions, but as the amount of Javascript starts growing, we need to follow better practices).

Subversion configuration

Edit the file ~/.subversion/config

Make sure the following line is not commented out:

enable-auto-props = yes

In the section [auto-props], add the following entries:

*.js = svn:eol-style=native
*.xml = svn:eol-style=native
*.java = svn:eol-style=native
*.txt = svn:eol-style=native
*.xconf = svn:eol-style=native
*.xweb = svn:eol-style=native
*.xmap = svn:eol-style=native
*.properties = svn:eol-style=native
*.css = svn:eol-style=native
*.xsl = svn:eol-style=native
*.xsd = svn:eol-style=native
*.dtd = svn:eol-style=native
*.ent = svn:eol-style=native
*.nsh = svn:eol-style=native
*.nsi = svn:eol-style=native
*.ini = svn:eol-style=native
*.conf = svn:eol-style=native

Submitting a patch

Always start from an SVN checkout to edit sources. This can be the trunk, where the main development is happening, or a maintenance branch.

See the information on getting the sources.

When you want to contribute changes as a patch, go to the root of the Daisy source tree, and enter:

svn diff > mypatch.txt

This will create a file called mypatch.txt containing all the changes you made to the source tree. You can make a diff of just some files by listing them after the diff command.

  • It is recommended to have a look in the patch file to see if it doesn't contain irrelevant changes.
  • Before doing a diff, do an "svn update" to make sure you have the latest code
  • Generally it is a good idea to discuss changes beforehand on the mailing list.
  • See the SVN book to learn more about subversion.

If you have created new files that are not yet in the subversion repository, you need to add them first using svn add, before doing svn diff:

svn add path-to-new-file

You can then add your patch as an issue in Jira. A good description/motivation about your patch will help to get it applied.

Thanks in advance for your contribution!

Maintaining change logs

(for committers)

When committing a feature change, make sure to mention it on the changes page for the current release (which is part of the documentation of that release). Same holds for commits which involve backwards incompatible changes or changes that require special action when updating.

When committing a change which requires people to make database changes, configuration changes or some other changes to their setup, please add them to this page on the community wiki (besides notifying the mailing list of course).

Comments (0)
Advertisement

Daisy hosting, installation, support. Workshops and turnkey Daisy CMS projects. Get Daisy from its creators.

outerthought.org

Downloads provided by

SourceForge.net Logo

Open source stats