# HG changeset patch # User Vladimir Homutov # Date 1369234051 -14400 # Node ID 7bee6f82db95260061ad82c2be0191e2169e3d5a # Parent a5e982a394dfec27aa89785763843979c7700ffc Actually added new files for the "Contributing Changes" article. diff -r a5e982a394df -r 7bee6f82db95 xml/en/docs/contributing_changes.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/contributing_changes.xml Wed May 22 18:47:31 2013 +0400 @@ -0,0 +1,150 @@ + + + + + + +
+ +
+ + +nginx is using Mercurial +to store source code. +The repository can be cloned +with the following command: + +hg clone http://hg.nginx.org/nginx + + + +
+ + +
+ + +Changes should be formatted according to the code style used by nginx. +Code formatting should not rely on such editor features like syntax +highlighting or automatic line breaking. +Below are some basic rules: + + + +maximum text width is 80 characters + + + +indentation is four spaces + + + +no tabs + + + +logical code blocks in a file are separated with two empty lines + + + +Examine how existing nginx sources are formatted and mimic this style +in your code. +Changes will more likely be accepted if style corresponds to the surrounding +code. + + + +Commit the changes to create a Mercurial +changeset. +Please ensure that the specified +e-mail +address and real name of the change’s author are correct. + + + +The commit message should have a single-line synopsis followed by verbose +description after an empty line. +It is desirable that the first line is no longer than 67 symbols. +The resulting changeset as a patch can be obtained using the +hg export command: + +# HG changeset patch +# User Filipe Da Silva <username@example.com> +# Date 1368089668 -7200 +# Thu May 09 10:54:28 2013 +0200 +# Node ID 2220de0521ca2c0b664a8ea1e201ce1cb90fd7a2 +# Parent 822b82191940ef309cd1e6502f94d50d811252a1 +Mail: removed surplus ngx_close_connection() call. + +It is already called for a peer connection a few lines above. + +diff -r 822b82191940 -r 2220de0521ca src/mail/ngx_mail_auth_http_module.c +--- a/src/mail/ngx_mail_auth_http_module.c Wed May 15 15:04:49 2013 +0400 ++++ b/src/mail/ngx_mail_auth_http_module.c Thu May 09 10:54:28 2013 +0200 +@@ -699,7 +699,6 @@ ngx_mail_auth_http_process_headers(ngx_m + + p = ngx_pnalloc(s->connection->pool, ctx->err.len); + if (p == NULL) { +- ngx_close_connection(ctx->peer.connection); + ngx_destroy_pool(ctx->pool); + ngx_mail_session_internal_server_error(s); + return; + + + +
+ + +
+ + +Several points are worth to consider before submitting changes: + + + +The proposed changes should work properly on a wide range of +supported +platforms. + + + +Try to make it clear why the suggested change is needed, and provide a use +case, if possible. + + + + + +
+ + +
+ + +The proposed changes should be sent to the +nginx development +mailing list. +The preferred and convenient method of submitting changesets +is with the +patchbomb +extension. + + +
+ + +
+ + +Submitting changes implies granting project a permission to use it under +an appropriate license. + + +
+ +
diff -r a5e982a394df -r 7bee6f82db95 xml/ru/docs/contributing_changes.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/ru/docs/contributing_changes.xml Wed May 22 18:47:31 2013 +0400 @@ -0,0 +1,148 @@ + + + + + + +
+ +
+ + +nginx использует Mercurial +для хранения исходного кода. +Репозиторий можно клонировать +следующей командой: + +hg clone http://hg.nginx.org/nginx + + + +
+ + +
+ + +Изменения должны быть оформлены согласно принятому в nginx стилю. +Оформление не должно зависеть от таких возможностей редактора как подсветка +синтаксиса или автоматический перенос строк. +Ниже приведены несколько основных правил: + + + +максимальная ширина текста — 80 символов + + + +отступ — 4 пробела + + + +табуляция не используется + + + +логические блоки кода в файле разделяются двумя пустыми строками + + + +Изучите, как оформлен исходный код nginx, и следуйте этому стилю в своём коде. +Изменения скорее будут приняты, если их стиль соответствует окружающему коду. + + + +Зафиксируйте изменения, чтобы создать +набор изменений +в Mercurial. +Пожалуйста, убедитесь, что адрес +электронной +почты и настоящее имя автора изменения указаны правильно. + + + +Сообщение фиксации должно содержать однострочное резюме и подробное описание +после пустой строки. +Желательно, чтобы первая строка была не длиннее 67 символов. +Итоговый набор изменений в виде патча может быть получен с помощью команды +hg export: + +# HG changeset patch +# User Filipe Da Silva <username@example.com> +# Date 1368089668 -7200 +# Thu May 09 10:54:28 2013 +0200 +# Node ID 2220de0521ca2c0b664a8ea1e201ce1cb90fd7a2 +# Parent 822b82191940ef309cd1e6502f94d50d811252a1 +Mail: removed surplus ngx_close_connection() call. + +It is already called for a peer connection a few lines above. + +diff -r 822b82191940 -r 2220de0521ca src/mail/ngx_mail_auth_http_module.c +--- a/src/mail/ngx_mail_auth_http_module.c Wed May 15 15:04:49 2013 +0400 ++++ b/src/mail/ngx_mail_auth_http_module.c Thu May 09 10:54:28 2013 +0200 +@@ -699,7 +699,6 @@ ngx_mail_auth_http_process_headers(ngx_m + + p = ngx_pnalloc(s->connection->pool, ctx->err.len); + if (p == NULL) { +- ngx_close_connection(ctx->peer.connection); + ngx_destroy_pool(ctx->pool); + ngx_mail_session_internal_server_error(s); + return; + + + +
+ + +
+ + +Несколько моментов, на которые следует обратить внимание перед +отправкой изменения: + + + +Предлагаемые изменения должны корректно работать на всех +поддерживаемых +платформах. + + + +Постарайтесь разъяснить, почему предлагаемое изменение нужно, и, если возможно, +опишите вариант использования. + + + + + +
+ + +
+ + +Предлагаемые изменения следует отправить в список рассылки для +разработчиков nginx. +Предпочитаемый и удобный метод отправки наборов изменений — +при помощи расширения +patchbomb. + + +
+ + +
+ + +Отправка изменений подразумевает предоставление проекту права на их +использование под соответствующей лицензией. + + +
+ +