subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1565388 - /subversion/trunk/subversion/libsvn_client/update.c
Date Thu, 06 Feb 2014 18:40:01 GMT
Author: breser
Date: Thu Feb  6 18:40:00 2014
New Revision: 1565388

Provide an error message to users if all their update targets are not working
copies rather than just telling them we skipped them.

The existing behavior is terribly confusing.  Why did we skip it?  The behavior
is there to allow things like `svn up *` where some of the paths end up not
being working copies.  But it comes at a tremendous cost.  This change tries
to walk the line by providing an error if all of the targets fail due to not
being working copies.  There still will some possible confusion if only some
of the targets fail due to not being working copies since you'll still get
only the skipped behavior, but without changing the notification API I don't
see a way around it.

* subversion/libsvn_client/update.c
  (svn_client_update4): return an error if all the targets aren't wcs.  It
    will still generate the skip message so users can still see what their
    targets are.


Modified: subversion/trunk/subversion/libsvn_client/update.c
--- subversion/trunk/subversion/libsvn_client/update.c (original)
+++ subversion/trunk/subversion/libsvn_client/update.c Thu Feb  6 18:40:00 2014
@@ -633,6 +633,7 @@ svn_client_update4(apr_array_header_t **
   const char *path = NULL;
   svn_boolean_t sleep = FALSE;
   svn_error_t *err = SVN_NO_ERROR;
+  svn_boolean_t found_valid_target = FALSE;
   if (result_revs)
     *result_revs = apr_array_make(pool, paths->nelts, sizeof(svn_revnum_t));
@@ -694,12 +695,18 @@ svn_client_update4(apr_array_header_t **
               (*ctx->notify_func2)(ctx->notify_baton2, notify, iterpool);
+      else
+        found_valid_target = TRUE;
       if (result_revs)
         APR_ARRAY_PUSH(*result_revs, svn_revnum_t) = result_rev;
+  if (!err && !found_valid_target)
+    return svn_error_create(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
+                            _("None of the targets are working copies"));
   if (sleep)
       const char *wcroot_abspath;

View raw message