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

Re: [PATCH] Make svn_err_best_message() skip tracing-only error chain links.

From: Hyrum K. Wright <hyrum_at_hyrumwright.org>
Date: Tue, 13 Oct 2009 10:27:07 -0500

On Oct 9, 2009, at 4:02 PM, C. Michael Pilato wrote:

> Hey, I've got a crazy working copy state at the moment, but I wanted
> to pass
> this patch off for review (and commit, if you get a chance to test
> it and
> it's all good) lest I forget about it.

I applied this patch and ran davautocheck, with the following results:
At least one test FAILED, checking /home/hwright/dev/svn-trunk/tests.log
FAIL: merge_authz_tests.py 1: skipped paths get overriding mergeinfo
FAIL: switch_tests.py 19: out of date propset should fail after a
relocate

merge_authz_tests.py 1:
...
CMD: svn merge -r4:8 http://localhost:5497/svn-test-work/repositories/merge_authz_tests-1/A
  svn-test-work/working_copies/merge_authz_tests-1.restricted/A_COPY_2
--config-dir /home/hwright/dev/svn-trunk/subversion/tests/cmdline/svn-
test-work/local_tmp/config --password rayjandom --no-auth-cache --
username jrandom
<TIME = 0.248447>
Skipped missing target: 'svn-test-work/working_copies/
merge_authz_tests-1.restricted/A_COPY_2/B/E'
    C svn-test-work/working_copies/merge_authz_tests-1.restricted/
A_COPY_2/D/G
--- Merging r5 through r8 into 'svn-test-work/working_copies/
merge_authz_tests-1.restricted/A_COPY_2/D/H/omega':
U svn-test-work/working_copies/merge_authz_tests-1.restricted/
A_COPY_2/D/H/omega
    C svn-test-work/working_copies/merge_authz_tests-1.restricted/
A_COPY_2/D/H/psi
Summary of conflicts:
   Tree conflicts: 2
   Skipped paths: 1
=============================================================
Merge failed to skip: svn-test-work/working_copies/
merge_authz_tests-1.restricted/A_COPY_2/D
=============================================================
Traceback (most recent call last):
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
main.py", line 1172, in run
     rc = self.pred.run(sandbox)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
testcase.py", line 217, in run
     return self._delegate.run(sandbox)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
testcase.py", line 217, in run
     return self._delegate.run(sandbox)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
testcase.py", line 146, in run
     return self.func(sandbox)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/
merge_authz_tests.py", line 269, in mergeinfo_and_skipped_paths
     None, 1, 0)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
actions.py", line 820, in run_and_verify_merge
     b_baton, check_props, dry_run)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
actions.py", line 937, in run_and_verify_merge2
     extra_skip, None, missing_skip, None)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
tree.py", line 676, in compare_trees
     singleton_handler_b, b_baton)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
tree.py", line 676, in compare_trees
     singleton_handler_b, b_baton)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
tree.py", line 676, in compare_trees
     singleton_handler_b, b_baton)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
tree.py", line 676, in compare_trees
     singleton_handler_b, b_baton)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
tree.py", line 681, in compare_trees
     singleton_handler_b(b_child, b_baton)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
actions.py", line 925, in missing_skip
     raise Failure
Failure
FAIL: merge_authz_tests.py 1: skipped paths get overriding mergeinfo

switch_tests.py 19:
CMD: svn ci -m "log msg" svn-test-work/working_copies/switch_tests-19
--config-dir /home/hwright/dev/svn-trunk/subversion/tests/cmdline/svn-
test-work/local_tmp/config --password rayjandom --no-auth-cache --
username jrandom
CMD: /home/hwright/dev/svn-trunk/subversion/svn/svn ci -m log msg svn-
test-work/working_copies/switch_tests-19 --config-dir /home/hwright/
dev/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config
--password rayjandom --no-auth-cache --username jrandom exited with 1
<TIME = 0.103173>
Sending svn-test-work/working_copies/switch_tests-19/A/D
subversion/svn/commit-cmd.c:142: (apr_err=2)
subversion/libsvn_client/commit.c:853: (apr_err=2)
svn: Commit failed (details follow):
subversion/libsvn_client/commit_util.c:1627: (apr_err=2)
subversion/libsvn_delta/path_driver.c:167: (apr_err=2)
subversion/libsvn_wc/adm_crawler.c:1375: (apr_err=2)
subversion/libsvn_ra_neon/commit.c:962: (apr_err=2)
subversion/libsvn_ra_neon/util.c:1480: (apr_err=2)
subversion/libsvn_ra_neon/util.c:732: (apr_err=2)
svn: Could not open the requested SVN filesystem
EXPECTED STDERR (regexp):
.*([Oo]ut.of.date)
ACTUAL STDERR:
subversion/svn/commit-cmd.c:142: (apr_err=2)
subversion/libsvn_client/commit.c:853: (apr_err=2)
svn: Commit failed (details follow):
subversion/libsvn_client/commit_util.c:1627: (apr_err=2)
subversion/libsvn_delta/path_driver.c:167: (apr_err=2)
subversion/libsvn_wc/adm_crawler.c:1375: (apr_err=2)
subversion/libsvn_ra_neon/commit.c:962: (apr_err=2)
subversion/libsvn_ra_neon/util.c:1480: (apr_err=2)
subversion/libsvn_ra_neon/util.c:732: (apr_err=2)
svn: Could not open the requested SVN filesystem
EXCEPTION: SVNUnmatchedError
Traceback (most recent call last):
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
main.py", line 1172, in run
     rc = self.pred.run(sandbox)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
testcase.py", line 146, in run
     return self.func(sandbox)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/
switch_tests.py", line 1133, in relocate_and_propset
     wc_dir)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
actions.py", line 1211, in run_and_verify_commit
     verify.verify_outputs(None, None, errput, None, expected_err)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
verify.py", line 363, in verify_outputs
     compare_and_display_lines(message, label, expected, actual,
raisable)
   File "/home/hwright/dev/svn-trunk/subversion/tests/cmdline/svntest/
verify.py", line 336, in compare_and_display_lines
     raise raisable
SVNUnmatchedError
FAIL: switch_tests.py 19: out of date propset should fail after a
relocate

I haven't looked into either of these errors, but am providing this
feedback as requested.

-Hyrum

> Simple change, really, just making svn_err_best_message() skip past
> the
> tracing-only error chain links when choosing which error message to
> return.
> Some chance that it breaks a test expectation somewhere, though, I
> guess,
> so I didn't want to commit up without testing, and I haven't time to
> do that
> right now.
>
> --
> C. Michael Pilato <cmpilato_at_collab.net>
> CollabNet <> www.collab.net <> Distributed Development On
> Demand
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2405676Skip
> past tracing-only error chain links when choosing the "best error
> message". This allows admins to see, for example, the following in
> their Apache error_log:
>
> [Fri Oct 09 16:37:00 2009] [error] [client 127.0.0.1] Failed to
> load the \
> AuthzSVNAccessFile: Circular dependency between groups 'devs1' and
> 'devs'
>
> instead of this considerable less-helpful error:
>
> [Fri Oct 09 16:25:28 2009] [error] [client 127.0.0.1] Failed to
> load the \
> AuthzSVNAccessFile: traced call
>
> * subversion/libsvn_subr/error.c:
> (svn_err_best_message): Skip past tracing-only error chain links.
> (svn_handle_warning2): Don't skip past tracing-only error chain
> links here, as svn_err_best_message() (which this function calls)
> will do that for us now.
>
> Index: subversion/libsvn_subr/error.c
> ===================================================================
> --- subversion/libsvn_subr/error.c (revision 39902)
> +++ subversion/libsvn_subr/error.c (working copy)
> @@ -526,10 +526,6 @@
> {
> char buf[256];
>
> - /* Skip over any trace records. */
> - while (is_tracing_link(err))
> - err = err->child;
> -
> svn_error_clear(svn_cmdline_fprintf
> (stream, err->pool,
> _("%swarning: %s\n"),
> @@ -540,6 +536,9 @@
> const char *
> svn_err_best_message(svn_error_t *err, char *buf, apr_size_t bufsize)
> {
> + /* Skip over any trace records. */
> + while (is_tracing_link(err))
> + err = err->child;
> if (err->message)
> return err->message;
> else

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2407147
Received on 2009-10-13 22:58:00 CEST

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.