Author: stsp Date: Tue Sep 18 10:14:40 2012 New Revision: 1387081 URL: http://svn.apache.org/viewvc?rev=1387081&view=rev Log: * publish/docs/release-notes/1.8.html: Mention hook script environment configuration support and UTF-8 support in mod_dav_svn.
Modified: subversion/site/publish/docs/release-notes/1.8.html Modified: subversion/site/publish/docs/release-notes/1.8.html URL: http://svn.apache.org/viewvc/subversion/site/publish/docs/release-notes/1.8.html?rev=1387081&r1=1387080&r2=1387081&view=diff ============================================================================== --- subversion/site/publish/docs/release-notes/1.8.html (original) +++ subversion/site/publish/docs/release-notes/1.8.html Tue Sep 18 10:14:40 2012 @@ -649,6 +649,41 @@ We will consider amending the list of sy href="http://svn.apache.org/repos/asf/subversion/trunk/CHANGES">CHANGES</a> file for details.</p> +<div class="h4" id="mod-dav-svn-utf8"> +<h4><tt>mod_dav_svn</tt> now supports hook script UTF-8 input/output + <a class="sectionlink" href="#hooks-post-commit" + title="Link to this section">¶</a> +</h4> + +<p>As documented in <a +href="http://subversion.tigris.org/issues/show_bug.cgi?id=2487" +>issue #2487</a>, hook scripts run on a <tt>mod_dav_svn</tt>-based +Subversion server previously had problems with non-ASCII input and output. +Because Apache HTTPD modules always run in the "C" locale, +which is restricted to ASCII, <tt>mod_dav_svn</tt> usually failed +trying to process non-ASCII characters.</p> + +<p>Among other problems, this prevented <tt>pre-lock</tt> and +<tt>post-unlock</tt> hook scripts from operating on paths containing +non-ASCII characters, and prevented non-ASCII error output from +<tt>start-commit</tt> and <tt>pre-commit</tt> hooks from reaching +SVN clients.</p> + +<p>Subversion 1.8 addresses these problems with a new <tt>SVNUseUTF8</tt> +option for <tt>mod_dav_svn</tt>. If this option is set, <tt>mod_dav_svn</tt> +assumes that all hook script input/output is encoded in UTF-8. +This is always the case for paths passed to hook scripts, since Subversion +uses UTF-8 internally for all paths. If this option is set, hook scripts +<b>must</b> write error messages to stderr in UTF-8. Because ASCII is a +subset of UTF-8 existing hook scripts will continue to work unmodified.</p> + +<p>For best results, hook scripts should use a UTF-8 locale if the +<tt>SVNUseUTF8</tt> option is active. It is recommended to configure +a UTF-8 locale using the <a href="#hooks-env" +>hook script environment configuration file</a>.</p> + +</div> <!-- mod-dav-svn --> + </div> <!-- bug-fixes --> @@ -672,6 +707,49 @@ file for a complete list.</p> title="Link to this section">¶</a> </h3> +<div class="h4" id="hooks-env"> +<h4>Hook script environment variables are now configurable + <a class="sectionlink" href="#hooks-env" + title="Link to this section">¶</a> +</h4> + +<p>In Subversion 1.7 and earlier, hook scripts always run in an empty +environment. If environment variables are needed hook scripts had to +configure them manually. Subversion 1.8 supports configuration of hook +script environment variables, on a per-server or per-repository basis.</p> + +<p>The hook script environment is configured in a new configuration file +located either at <tt>conf/hooks-env</tt> in a repository, or at a +server-wide location specified in <tt>svnserve.conf</tt> (using the +new <tt>hooks-env</tt> option) or <tt>httpd.conf</tt> (using the +new <tt>SVNHooksEnv</tt> option).</p> + +<p>The hook script environment configurtion file uses a format similar +to that of other Subversion configuration files:</p> +<pre> +### This file is an example hook script environment configuration file. +### Hook scripts run in an empty environment by default. +### As shown below each section defines environment variables for a +### particular hook script. The [default] section defines environment +### variables for all hook scripts, unless overridden by a hook-specific +### section. + +### This example configures a UTF-8 locale for all hook scripts, so that +### special characters, such as umlauts, may be printed to stderr. +### If UTF-8 is used with a mod_dav_svn server, the <a href="#mod-dav-svn-utf8">SVNUseUTF8</a> option must +### also be set to 'yes' in httpd.conf. +### With svnserve, the LANG environment variable of the svnserve process +### must be set to the same value as given here. +[default] +# LANG = en_US.UTF-8 + +### This sets the PATH environment variable for the pre-commit hook. +# [pre-commit] +# PATH = /usr/local/bin:/usr/bin:/usr/sbin +</pre> + +</div> <!-- hooks-env --> + <div class="h4" id="hooks-post-commit"> <h4><tt>post-commit</tt> hook grows <tt>txn-name</tt> argument <a class="sectionlink" href="#hooks-post-commit"