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

Question regarding bug report 3148: Too early svn up/co abort if one item of svn:externals resource list is not accessible

From: Achim Spangler <Achim.Spangler_at_mnet-online.de>
Date: Mon, 4 Aug 2008 13:12:14 +0200

as this bug report wasn't processed for 1.5.1 release, I tried to get some
clues on this problem on my own.

As far as I understand the code, the problem seems to depend on
libsvn_client/externals.c with the function:
static svn_error_t *
handle_externals_desc_change(const void *key, apr_ssize_t klen,
                             enum svn_hash_diff_key_status status,
                             void *baton)

There the SVN_ERR macro is used to bail out from the loop, as soon as a
problem is found:
  /* We must use a custom version of svn_hash_diff so that the diff
     entries are processed in the order they were originally specified
     in the svn:externals properties. */

  for (i = 0; old_desc && (i < old_desc->nelts); i++)
      item = APR_ARRAY_IDX(old_desc, i, svn_wc_external_item2_t *);

      if (apr_hash_get(new_desc_hash, item->target_dir, APR_HASH_KEY_STRING))
                                            svn_hash_diff_key_both, &ib));
                                            svn_hash_diff_key_a, &ib));
  for (i = 0; new_desc && (i < new_desc->nelts); i++)
      item = APR_ARRAY_IDX(new_desc, i, svn_wc_external_item2_t *);
      if (! apr_hash_get(old_desc_hash, item->target_dir,
                                            svn_hash_diff_key_b, &ib));

With some luck, it is enough to replace the SVN_ERR call so that no
hidden "return svn_err__temp;" is executed. Maybe a call
to "svn_handle_warning2(...)" would help.

The main change steps could be:
a) collect several warnings - up to one per svn:externals entry to some sort
   of list
b) adapt error structure, so that upper caller level notifies this as
   warning and not error
Maybe it would even be enough to collect the errors from the different
svn:externals entries in this function - and return this collection as normal
error - as the svn:externals seem to be processed at the end, nothing else
would get lost by a termination after all of those items.

I hope that some other more experienced SVN-Developers can find an appropriate

I would be very happy, to see this problem fixed in 1.5.2, as it is very
irritating for users, when the complete "svn up" is aborted, only if the user
doesn't have enough access rights for some of the contained svn:externals

Kind Regards,
Achim Spangler

To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-08-04 13:12:40 CEST

This is an archived mail posted to the Subversion Dev mailing list.