comparison xml/en/docs/contributing_changes.xml @ 912:7bee6f82db95

Actually added new files for the "Contributing Changes" article.
author Vladimir Homutov <vl@nginx.com>
date Wed, 22 May 2013 18:47:31 +0400
parents
children b568f0c47599
comparison
equal deleted inserted replaced
911:a5e982a394df 912:7bee6f82db95
1 <?xml version="1.0"?>
2
3 <!--
4 Copyright (C) Nginx, Inc.
5 -->
6
7 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd">
8
9 <article name="Contributing Changes"
10 link="/en/docs/contributing_changes.html"
11 lang="en"
12 rev="1">
13
14 <section id="getting_sources" name="Getting Sources">
15
16 <para>
17 nginx is using <link url="http://mercurial.selenic.com">Mercurial</link>
18 to store source code.
19 The <link url="http://hg.nginx.org/nginx">repository</link> can be cloned
20 with the following command:
21 <programlisting>
22 hg clone http://hg.nginx.org/nginx
23 </programlisting>
24 </para>
25
26 </section>
27
28
29 <section id="formatting_changes" name="Formatting Changes">
30
31 <para>
32 Changes should be formatted according to the code style used by nginx.
33 Code formatting should not rely on such editor features like syntax
34 highlighting or automatic line breaking.
35 Below are some basic rules:
36 <list type="bullet">
37
38 <listitem>
39 maximum text width is 80 characters
40 </listitem>
41
42 <listitem>
43 indentation is four spaces
44 </listitem>
45
46 <listitem>
47 no tabs
48 </listitem>
49
50 <listitem>
51 logical code blocks in a file are separated with two empty lines
52 </listitem>
53
54 </list>
55 Examine how existing nginx sources are formatted and mimic this style
56 in your code.
57 Changes will more likely be accepted if style corresponds to the surrounding
58 code.
59 </para>
60
61 <para>
62 Commit the changes to create a Mercurial
63 <link url="http://mercurial.selenic.com/wiki/ChangeSet">changeset</link>.
64 Please ensure that the specified
65 <link url="http://mercurial.selenic.com/wiki/QuickStart#Setting_a_username">e-mail</link>
66 address and real name of the change’s author are correct.
67 </para>
68
69 <para>
70 The commit message should have a single-line synopsis followed by verbose
71 description after an empty line.
72 It is desirable that the first line is no longer than 67 symbols.
73 The resulting changeset as a patch can be obtained using the
74 <literal>hg export</literal> command:
75 <programlisting>
76 # HG changeset patch
77 # User Filipe Da Silva &lt;username@example.com>
78 # Date 1368089668 -7200
79 # Thu May 09 10:54:28 2013 +0200
80 # Node ID 2220de0521ca2c0b664a8ea1e201ce1cb90fd7a2
81 # Parent 822b82191940ef309cd1e6502f94d50d811252a1
82 Mail: removed surplus ngx_close_connection() call.
83
84 It is already called for a peer connection a few lines above.
85
86 diff -r 822b82191940 -r 2220de0521ca src/mail/ngx_mail_auth_http_module.c
87 --- a/src/mail/ngx_mail_auth_http_module.c Wed May 15 15:04:49 2013 +0400
88 +++ b/src/mail/ngx_mail_auth_http_module.c Thu May 09 10:54:28 2013 +0200
89 @@ -699,7 +699,6 @@ ngx_mail_auth_http_process_headers(ngx_m
90
91 p = ngx_pnalloc(s->connection->pool, ctx->err.len);
92 if (p == NULL) {
93 - ngx_close_connection(ctx->peer.connection);
94 ngx_destroy_pool(ctx->pool);
95 ngx_mail_session_internal_server_error(s);
96 return;
97 </programlisting>
98 </para>
99
100 </section>
101
102
103 <section id="before_submitting" name="Before Submitting">
104
105 <para>
106 Several points are worth to consider before submitting changes:
107 <list type="bullet">
108
109 <listitem>
110 The proposed changes should work properly on a wide range of
111 <link doc="../index.xml" id="tested_os_and_platforms">supported
112 platforms</link>.
113 </listitem>
114
115 <listitem>
116 Try to make it clear why the suggested change is needed, and provide a use
117 case, if possible.
118 </listitem>
119
120 </list>
121 </para>
122
123 </section>
124
125
126 <section id="submitting_changes" name="Submitting Changes">
127
128 <para>
129 The proposed changes should be sent to the
130 <link doc="../support.xml" id="nginx_devel">nginx development</link>
131 mailing list.
132 The preferred and convenient method of submitting changesets
133 is with the
134 <link url="http://mercurial.selenic.com/wiki/PatchbombExtension">patchbomb</link>
135 extension.
136 </para>
137
138 </section>
139
140
141 <section id="license" name="License">
142
143 <para>
144 Submitting changes implies granting project a permission to use it under
145 an appropriate <link url="../../LICENSE">license</link>.
146 </para>
147
148 </section>
149
150 </article>