svn subrepo and solaris and en_US.UTF-8
Patrick Mézard
pmezard at gmail.com
Sun Jan 17 04:33:05 CST 2010
Le 17/01/10 01:49, Mads Kiilerich a écrit :
>
> test-subrepo-svn fails on solaris because "hg ci -m1" in the "add first
> svn sub" fails with
> +abort: couldn't set locale correctly
> +couldn't set locale correctly
> +couldn't set locale correctly
> +svn: warning: cannot set LC_CTYPE locale
> +svn: warning: environment variable LC_ALL is en_US.UTF-8
> +svn: warning: please check that your locale name is correct
>
> - that is probably because en_US.UTF-8 isn't known on solaris. Setting
> it to C in mercurial/subrepo.py makes the test pass - but that is
> probably not a solution?
No, it means the current solution is not valid. There are 2 issues here:
1- svn output is localized which breaks the current parser
2- there are issues if current locale is unable to convert repository strings (http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.advanced.l10n)
My solution to the second one is clearly stupid, you cannot force UTF-8 on platforms where it's not available, it's up to the user to use a sensible locale compatible with all it's subversion subrepos. I expect some issues here on Windows, but I cannot see how to solve it on the client side.
For the first problem, we should use --xml calls whenever possible, use command exit status when possible, then check the remaining commands and adapt the code.
--
Patrick Mézard
More information about the Mercurial-devel
mailing list