You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/07/21 15:11:19 UTC
svn commit: r1149160 - in /subversion/trunk/subversion: libsvn_ra_serf/log.c
tests/cmdline/log_tests.py
Author: rhuijben
Date: Thu Jul 21 13:11:18 2011
New Revision: 1149160
URL: http://svn.apache.org/viewvc?rev=1149160&view=rev
Log:
Resolve issue #3937 and an XFail test that is attributed to issue #3936, but
really tests issue #3937 as svn log doesn't seem to call svn_ra_get_locations()
in the right way to see this issue.
As a small bonus reduce the amount of memory used by svn log a bit more by
storing parsed xml for an item in the item pool instead of the xml parser pool.
* subversion/libsvn_ra_serf/log.c
(cdata_log): Store info strings in the info pool.
(svn_ra_serf__get_log): Also check the http status code instead of just
assuming every succeeded request is ok.
* subversion/tests/cmdline/log_tests.py
(log_with_unrelated_peg_and_operative_revs): Remove serf specific XFail
marker and remove obsolete comment.
(log_on_nonexistent_path_and_valid_rev): Remove serf specific XFail marker
and remove XFail comment.
Modified:
subversion/trunk/subversion/libsvn_ra_serf/log.c
subversion/trunk/subversion/tests/cmdline/log_tests.py
Modified: subversion/trunk/subversion/libsvn_ra_serf/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/log.c?rev=1149160&r1=1149159&r2=1149160&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/log.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/log.c Thu Jul 21 13:11:18 2011
@@ -464,7 +464,7 @@ cdata_log(svn_ra_serf__xml_parser_t *par
case DELETED_PATH:
case MODIFIED_PATH:
svn_ra_serf__expand_string(&info->tmp, &info->tmp_len,
- data, len, parser->state->pool);
+ data, len, info->pool);
break;
default:
break;
@@ -589,6 +589,7 @@ svn_ra_serf__get_log(svn_ra_session_t *r
svn_ra_serf__xml_parser_t *parser_ctx;
svn_boolean_t want_custom_revprops;
svn_revnum_t peg_rev;
+ svn_error_t *err;
const char *relative_url, *basecoll_url, *req_url;
log_ctx = apr_pcalloc(pool, sizeof(*log_ctx));
@@ -674,7 +675,13 @@ svn_ra_serf__get_log(svn_ra_session_t *r
svn_ra_serf__request_create(handler);
- SVN_ERR(svn_ra_serf__context_run_wait(&log_ctx->done, session, pool));
+ err = svn_ra_serf__context_run_wait(&log_ctx->done, session, pool);
+
+ SVN_ERR(svn_error_compose_create(
+ svn_ra_serf__error_on_status(log_ctx->status_code,
+ req_url,
+ parser_ctx->location),
+ err));
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/log_tests.py?rev=1149160&r1=1149159&r2=1149160&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/log_tests.py Thu Jul 21 13:11:18 2011
@@ -1975,7 +1975,6 @@ def merge_sensitive_log_ignores_cyclic_m
#----------------------------------------------------------------------
@Issue(3931,3936)
-@XFail(svntest.main.is_ra_type_dav_serf)
def log_with_unrelated_peg_and_operative_revs(sbox):
"log with unrelated peg and operative rev targets"
@@ -1983,12 +1982,8 @@ def log_with_unrelated_peg_and_operative
target = sbox.repo_url + '/A/D/G/rho@2'
- # Currently this test fails because ra_serf returns an SVN_ERR_FS_NOT_FOUND
- # error from svn_ra_get_locations() that the other RA layers do not
- # return. The test passes with all other RA layers. See issue #3936.
-
# log for /A/D/G/rho, deleted in revision 5, recreated in revision 8
- expected_error = ".*File not found.*"
+ expected_error = ".*(File|path) not found.*"
svntest.actions.run_and_verify_svn(None, None, expected_error,
'log', '-r', '6:7', target)
svntest.actions.run_and_verify_svn(None, None, expected_error,
@@ -2008,7 +2003,6 @@ def log_with_unrelated_peg_and_operative
#----------------------------------------------------------------------
@Issue(3937)
-@XFail(svntest.main.is_ra_type_dav_serf)
def log_on_nonexistent_path_and_valid_rev(sbox):
"log on nonexistent path does not error out"
@@ -2028,8 +2022,6 @@ def log_on_nonexistent_path_and_valid_re
svntest.actions.run_and_verify_svn(None, None, expected_error,
'log', '-q', bad_url_bad_rev)
- # Currently this test fails over ra_serf because the following log
- # commands return empty logs rather than errors.
expected_error = ".*not found.*"
svntest.actions.run_and_verify_svn(None, None, expected_error,
'log', '-q', bad_path_real_rev)