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 2014/09/30 13:38:50 UTC
svn commit: r1628398 - /subversion/trunk/subversion/svn/checkout-cmd.c
Author: stsp
Date: Tue Sep 30 11:38:50 2014
New Revision: 1628398
URL: http://svn.apache.org/r1628398
Log:
Make 'svn checkout' report externals failures via its exit code,
like the export, list, switch, and update subcommands already do.
* subversion/svn/checkout-cmd.c
(svn_cl__checkout): Make use of svn_cl__check_externals_failed_notify_wrapper.
Modified:
subversion/trunk/subversion/svn/checkout-cmd.c
Modified: subversion/trunk/subversion/svn/checkout-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/checkout-cmd.c?rev=1628398&r1=1628397&r2=1628398&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/checkout-cmd.c (original)
+++ subversion/trunk/subversion/svn/checkout-cmd.c Tue Sep 30 11:38:50 2014
@@ -72,6 +72,7 @@ svn_cl__checkout(apr_getopt_t *os,
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
apr_pool_t *subpool;
apr_array_header_t *targets;
+ struct svn_cl__check_externals_failed_notify_baton nwb;
const char *last_target, *local_dir;
int i;
@@ -113,6 +114,12 @@ svn_cl__checkout(apr_getopt_t *os,
if (! opt_state->quiet)
SVN_ERR(svn_cl__notifier_mark_checkout(ctx->notify_baton2));
+ nwb.wrapped_func = ctx->notify_func2;
+ nwb.wrapped_baton = ctx->notify_baton2;
+ nwb.had_externals_error = FALSE;
+ ctx->notify_func2 = svn_cl__check_externals_failed_notify_wrapper;
+ ctx->notify_baton2 = &nwb;
+
subpool = svn_pool_create(pool);
for (i = 0; i < targets->nelts; ++i)
{
@@ -169,5 +176,10 @@ svn_cl__checkout(apr_getopt_t *os,
}
svn_pool_destroy(subpool);
+ if (nwb.had_externals_error)
+ return svn_error_create(SVN_ERR_CL_ERROR_PROCESSING_EXTERNALS, NULL,
+ _("Failure occurred processing one or "
+ "more externals definitions"));
+
return SVN_NO_ERROR;
}