[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion 1.4.6 : 3 tests fail when locale is set to Turkish (tr_TR.UTF-8)

From: Branko Čibej <brane_at_xbc.nu>
Date: 2007-12-22 23:07:07 CET

Arfrever Frehtes Taifersar Arahesis wrote:
> 2007-12-22 22:19:18 Ismail Dönmez napisał(a):
>>> Can you post a log file from the test run?
>> Log attached, thanks.
> <Snip>
> CMD: svn "log" "-r" "COMMITTED" "--config-dir" "/home/cartman/subversion-1.4.6/subversion/tests/cmdline/svn-test-work/local_tmp/config" <TIME = 0.039289>
> svn: Syntax error in revision argument 'COMMITTED'
> FAIL: log_tests.py 6: 'svn log -r COMMITTED' of dynamic/local WC rev
> </Snip>


I suspect we're trying to do some kind of case-insensitive parsing of
the "committed" revision keyword ... I bet there's a "tolower" or some
such involved ...

/me checks code ... it's been a long time

Oh wow. linsvn_subr/opt.c:revision_from_word does this:

  else if (strcasecmp(word, "committed") == 0)
      revision->kind = svn_opt_revision_committed;

The interesting thing to note here is that strcasecmp is in fact doing
the right thing, since "COMMITTED" and "committed" aren't
case-fold-equal in a Turkish locale. I'm not quite sure what to do here.
We could do a case-sensitive compare to both the all-uppercase and
all-lowercase variants, but that would not be backwards-compatible
because (in most locales :) we currently accept, e.g., "CommitTed" as
well, poor Ted.

One way to make this work would be to use the globbing pattern matcher,
apr_fnmatch, against "[Cc][Oo][Mm][Mm][Ii][Tt][Tt][Ee][Dd]". Note how
this elegantly sidesteps locale-dependent case folding. It's also a
bite-sized task to replace probably all instances of case-folding
compare on static strings in our code with something like this. ... Any

-- Brane

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 22 23:07:15 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.