Dmitry Bakshaev
2018-10-25 18:27:22 UTC
my subversion server is apache-2.4.34/event-MPM and
subversion-1.9.7/mod_dav_svn
configuration based on example from
https://subversion.apache.org/docs/release-notes/1.8.html#hooks
cat httpd.conf:
SVNHooksEnv /etc/subversion/svnserve.conf
SVNUseUTF8 On #not "yes" as example say
cat /etc/subversion/svnserve.conf:
[default]
LANG = ru_RU.UTF-8
cat pre-commit:
#!/bin/sh
echo "Привет" >&2
pre-commit hook failed with message:
[Error output could not be translated from the native
locale to UTF-8.]
this bug is https://issues.apache.org/jira/browse/SVN-2487
related.
after some tracing of mod_dav_svn i find
call to svn_utf_initialize2() from init()
always does with conf->use_utf8=0.
adding svn_utf_initialize2() to merge_server_config()
fixes the problem.
patch attached.
--- subversion/mod_dav_svn/mod_dav_svn.c.orig<->2018-10-25
16:44:12.388287364 +0400
+++ subversion/mod_dav_svn/mod_dav_svn.c<------>2018-10-25
16:43:55.958287555 +0400
@@ -231,6 +231,8 @@
newconf->compression_level =
child->compression_level;
}
.
+ newconf->use_utf8 = INHERIT_VALUE(parent, child,
use_utf8);
+ svn_utf_initialize2(newconf->use_utf8, p);
return newconf;
}
.
subversion-1.9.7/mod_dav_svn
configuration based on example from
https://subversion.apache.org/docs/release-notes/1.8.html#hooks
cat httpd.conf:
SVNHooksEnv /etc/subversion/svnserve.conf
SVNUseUTF8 On #not "yes" as example say
cat /etc/subversion/svnserve.conf:
[default]
LANG = ru_RU.UTF-8
cat pre-commit:
#!/bin/sh
echo "Привет" >&2
pre-commit hook failed with message:
[Error output could not be translated from the native
locale to UTF-8.]
this bug is https://issues.apache.org/jira/browse/SVN-2487
related.
after some tracing of mod_dav_svn i find
call to svn_utf_initialize2() from init()
always does with conf->use_utf8=0.
adding svn_utf_initialize2() to merge_server_config()
fixes the problem.
patch attached.
--- subversion/mod_dav_svn/mod_dav_svn.c.orig<->2018-10-25
16:44:12.388287364 +0400
+++ subversion/mod_dav_svn/mod_dav_svn.c<------>2018-10-25
16:43:55.958287555 +0400
@@ -231,6 +231,8 @@
newconf->compression_level =
child->compression_level;
}
.
+ newconf->use_utf8 = INHERIT_VALUE(parent, child,
use_utf8);
+ svn_utf_initialize2(newconf->use_utf8, p);
return newconf;
}
.