[Twisted-Python] Simple Epoll Reactor question

Glyph Lefkowitz glyph at twistedmatrix.com
Mon Jul 27 21:20:40 EDT 2009

On Mon, Jul 27, 2009 at 11:18 AM, David Bern <odie5533 at gmail.com> wrote:

> On Fri, Jul 24, 2009 at 12:22 PM, Andrew Francis<andrewfr_ice at yahoo.com>
> wrote:

> Can do. Tell me how to submit a document patch.

David, thanks for trying to answer, but you described a few of the
particulars in a slightly non-standard way and you skipped a few steps.

The process for editing code and submitting patches is documented in detail
here: http://twistedmatrix.com/trac/wiki/TwistedDevelopment

I'll attach a few additional notes on editing docs.

> http://twistedmatrix.com/trac/browser/trunk/doc/core/howto/choosing-reactor.xhtml
> >
> and at the bottom is a download link
> <
> http://twistedmatrix.com/trac/browser/trunk/doc/core/howto/choosing-reactor.xhtml?format=raw
> >.

Instead of doing a diff on a single document like this — it's very hard to
test to make sure that you can actually generate the docs that way — you
should make a checkout of Twisted, like this:

svn checkout svn://svn.twistedmatrix.com/svn/Twisted/trunk

 This ensures you have the most up-to-date copy of Twisted.  You only have
to download it once; in the future you can just do

cd ~/my-code-dir/Twisted/trunk
svn update

Then, edit the document (or documents) that you want to change under doc/.
In order to make sure your changes are complete and correct, as well as to
preview what they will look like on the website, you need to run 'lore' on
them.  In this specific case, you can do

cd ~/my-code-dir/Twisted/trunk/doc/core/howto
lore choosing-reactor.xhtml

Then you can look at "choosing-reactor.html" (notice the input is ".xhtml"
and the output is ".html") in the web browser of your choice.

Please note that lore is rather picky.  You *can't* do 'lore
my-code-dir/Twisted/.../howto/choosing-reactor.xhtml' unless you know how to
set up lore's environment properly; it looks for certain things in its
current directory which are only present in the 'howto' directory.

Make a backup of the document, modify it to your liking, then at a
> console run
> >diff -u choosing-reactor_orig.xhtml choosing-reactor.xhtml >
> choosing-reactor.patch

In order to streamline the process of getting the diff accepted, please diff
it from the root of the repository.  In the case of more complex patches,
this helps to avoid forgetting to include things; it also allows the
reviewer to apply your patch more easily without inspecting it or manually
specifying all the names of the files to be patched.  Given the directory
structure I described above, this would be:

cd ~/my-code-dir/Twisted/trunk
svn diff > choosing-reactor.patch

Then submit the patch for review as described above.

Thanks a lot for your interest in contributing!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20090727/d68cba45/attachment.htm 

More information about the Twisted-Python mailing list