You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/04/24 11:01:21 UTC
svn commit: r1471302 - in /subversion/trunk/subversion: svn/log-cmd.c
tests/cmdline/log_tests.py
Author: stsp
Date: Wed Apr 24 09:01:20 2013
New Revision: 1471302
URL: http://svn.apache.org/r1471302
Log:
Make svn log --search case-sensitive, because apr_fnmatch() doesn't perform
case-insensitive matching in a desireable manner -- it only case-folds ASCII
and can cause assertions on Windows when dealing with UTF-8 data.
See for discussion: http://svn.haxx.se/dev/archive-2013-04/0374.shtml
* subversion/svn/log-cmd.c
(match_search_pattern): Don't use APR_FNM_CASE_BLIND.
* subversion/tests/cmdline/log_tests.py
(log_search): Adjust test expectations accordingly.
Modified:
subversion/trunk/subversion/svn/log-cmd.c
subversion/trunk/subversion/tests/cmdline/log_tests.py
Modified: subversion/trunk/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/log-cmd.c?rev=1471302&r1=1471301&r2=1471302&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/log-cmd.c (original)
+++ subversion/trunk/subversion/svn/log-cmd.c Wed Apr 24 09:01:20 2013
@@ -159,7 +159,7 @@ match_search_pattern(const char *search_
{
/* Match any substring containing the pattern, like UNIX 'grep' does. */
const char *pattern = apr_psprintf(pool, "*%s*", search_pattern);
- int flags = APR_FNM_CASE_BLIND;
+ int flags = 0;
/* Does the author match the search pattern? */
if (author && apr_fnmatch(pattern, author, flags) == APR_SUCCESS)
Modified: subversion/trunk/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/log_tests.py?rev=1471302&r1=1471301&r2=1471302&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/log_tests.py Wed Apr 24 09:01:20 2013
@@ -2296,13 +2296,13 @@ def log_search(sbox):
log_chain = parse_log_output(output)
check_log_chain(log_chain, [7, 6, 3])
- # search is case-insensitive
+ # search is case-sensitive
exit_code, output, err = svntest.actions.run_and_verify_svn(
None, None, [], 'log', '--search',
'FOR REVISION [367]')
log_chain = parse_log_output(output)
- check_log_chain(log_chain, [7, 6, 3])
+ check_log_chain(log_chain, [])
# multi-pattern search
exit_code, output, err = svntest.actions.run_and_verify_svn(