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

Re: svn commit: r1145982 - in /subversion/trunk/subversion: svn/proplist-cmd.c tests/cmdline/tree_conflict_tests.py

From: Noorul Islam K M <noorul_at_collab.net>
Date: Thu, 14 Jul 2011 10:47:51 +0530

rhuijben_at_apache.org writes:

> Author: rhuijben
> Date: Wed Jul 13 12:47:26 2011
> New Revision: 1145982
>
> URL: http://svn.apache.org/viewvc?rev=1145982&view=rev
> Log:
> Resolve another review todo from issue #3779 "how to handle actual only nodes"
> by making 'svn proplist' return a non zero exit code when one or more errors
> occurred.
>
> * subversion/svn/proplist-cmd.c
> (svn_cl__proplist): Check if all operations completed successfully and if
> not return an error.
>
> * subversion/tests/cmdline/tree_conflict_tests.py
> (actual_only_node_behaviour): Update expected result.
>
> Modified:
> subversion/trunk/subversion/svn/proplist-cmd.c
> subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py
>
> Modified: subversion/trunk/subversion/svn/proplist-cmd.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/proplist-cmd.c?rev=1145982&r1=1145981&r2=1145982&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/svn/proplist-cmd.c (original)
> +++ subversion/trunk/subversion/svn/proplist-cmd.c Wed Jul 13 12:47:26 2011
> @@ -168,6 +168,7 @@ svn_cl__proplist(apr_getopt_t *os,
> int i;
> apr_pool_t *iterpool;
> svn_proplist_receiver_t pl_receiver;
> + svn_boolean_t had_errors = FALSE;
>
> if (opt_state->xml)
> {
> @@ -189,6 +190,7 @@ svn_cl__proplist(apr_getopt_t *os,
> proplist_baton_t pl_baton;
> const char *truepath;
> svn_opt_revision_t peg_revision;
> + svn_boolean_t success;
>
> svn_pool_clear(iterpool);
> SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
> @@ -200,22 +202,31 @@ svn_cl__proplist(apr_getopt_t *os,
> SVN_ERR(svn_opt_parse_path(&peg_revision, &truepath, target,
> iterpool));
>
> - SVN_ERR(svn_cl__try
> - (svn_client_proplist3(truepath, &peg_revision,
> + SVN_ERR(svn_cl__try(
> + svn_client_proplist3(truepath, &peg_revision,
> &(opt_state->start_revision),
> opt_state->depth,
> opt_state->changelists,
> pl_receiver, &pl_baton,
> ctx, iterpool),
> - NULL, opt_state->quiet,
> + &success, opt_state->quiet,
> SVN_ERR_UNVERSIONED_RESOURCE,
> SVN_ERR_ENTRY_NOT_FOUND,
> SVN_NO_ERROR));
> +
> + if (!success)
> + had_errors = TRUE;
> }
> svn_pool_destroy(iterpool);
>
> if (opt_state->xml)
> SVN_ERR(svn_cl__xml_print_footer("properties", scratch_pool));
> +
> + /* Error out *after* we closed the XML element */
> + if (had_errors)
> + return svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL,
> + _("Could not display info for all targets "
> + "because some targets don't
> exist"));

I think here also the error message seems to incorrect. copy-pasto?

Thanks and Regards
Noorul
Received on 2011-07-14 07:20:27 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.