After the change is merged and the buildbots have completed running, delete the branch.

Details

News files

It is now up to the authors of individual changes to write high-level descriptions for their changes. These descriptions will be aggregated into the release notes distributed with Twisted releases. If we just let each author add to the NEWS files on every commit, though, we would run into lots of spurious conflicts. To avoid this, we have come up with a scheme involving separate files for each change.

Changes must be accompanied by an entry in at least one topfiles directory (eg trunk/twisted/topfiles/ or trunk/twisted/names/topfiles/). The entry must be a file named <ticket number>.<change type>. <ticket number> is replaced by the ticket number which is being resolved by the change (if multiple tickets are resolved, multiple files with the same contents should be added). <change type> is replaced by one of the following literal strings:

removal - for tickets which are deprecating something or removing something which was already deprecated.

misc - for tickets which are very minor and not worth summarizing outside of the svn changelog. These may be empty (their contents will be ignored).

The entry should contain a high-level description of the change suitable for end users. Generally, the grammatical subject of the sentence should be a Python object, and the verb should be something that the object does, prefixed with "now". Here's an example:

twisted.protocols.amp now raises InvalidSignature when bad arguments are passed to Command.makeArguments

You don't need to worry about newlines in the file; the contents will be rewrapped when added to the NEWS files.

See ​enforcenews.py for the svn pre-commit hook which enforces this policy.

Filing bugs and writing review requests

Tickets should be described well enough that the change is already justified and the new code should be easy enough to read that further explanations aren't necessary to understand it, but sometimes diffs themselves can be more difficult to read than either the old or new state of the code, so comments like the implementation of foo moved from bar.py to baz.py can sometimes make a reviewer's job easier.

Who can review?

Changes must be reviewed by a developer other than the author of the changes. If changes are paired on, a third party must review them. If changes constitute the work of several people who worked independently, a non-author must review them.

A reviewer need not necessarily be familiar with the specific area of Twisted being changed, but he or she should feel confident in his or her abilities to spot problems in the change.

How to be a good reviewer

First, make sure all of the obvious things are accounted for. Check the "Things your branch or patch must contain" list above, and make sure each point applies to the branch.
Use pyflakes to check the basic quality of the code. The following command will check all the files modified and added by a branch merge:

svn status | grep '^\M\|^A' | cut -c 8- | xargs pyflakes

A reviewer may reject a change for various reasons, many of which are hard to quantify. Basically, use your best judgement, and don't be afraid to point out problems which don't fit into the list of branch requirements laid out in this document.

Here are some extra things to consider while reviewing a change:

Is the code written in a straightforward manner which will allow it to be easily maintained in the future, possibly by a developer other than the author?

If it introduces a new feature, is that feature generally useful and have its long term implications been considered and accounted for?

Will it result in confusion to application developers?

Does it encourage application code using it to be well factored and easily testable?

Is it similar to any existing feature offered by Twisted, such that it might make sense as an extension or modification to some other piece of code, rather than an entirely new functional unit?

Does it require new documentation and examples?

The commit message

Several tools exist which parse commit messages to trunk, so the Author, Reviewer, and Fixes lines should conform to this format exactly. Multiple Fixes lines will close multiple tickets. Refs may also be used to attach the commit message to another ticket which is not being closed. The commit message should also describe the change being made in a modest amount of detail.

Reverting a change

If a change set somehow introduces a test suite regression or is otherwise found to be undesirable, it is to be reverted. Any developer may revert a commit which introduces a test suite regression on a supported platform. The revert message should be as explicit as possible. If it's a failure, put the message of the error in the commit message, possibly with the identifier of the buildbot slave. If there are too many failures, it can be put in the tracker, with a reference in the message. Use the "Reopens" tag to automatically reopen the ticket:

Revert r<revision number>: Brief description
A description of the problem, or a traceback if pertinent
Reopens: #<ticket number>

Reverted branches are to be reviewed again before being merged.
Some of the higher level things for a reviewer to consider about a branch: