You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2022/02/18 15:03:18 UTC

svn commit: r1898184 - in /subversion/branches/pristines-on-demand-on-mwf/subversion: libsvn_wc/wc_db_textbase.c tests/cmdline/authz_tests.py

Author: julianfoad
Date: Fri Feb 18 15:03:18 2022
New Revision: 1898184

URL: http://svn.apache.org/viewvc?rev=1898184&view=rev
Log:
On the 'pristines-on-demand-on-mwf' branch: fix authz_tests.py 31.

This test runs an 'update' after read access permission has been removed
from a repository path. The text base sync code errored out when it
tried to download this text base.

We fix it by making the text base sync code ignore authorization errors,
leaving any such base unfetched and continuing to try the others.

* subversion/tests/cmdline/authz_tests.py
  (remove_access_after_commit): Re-enable.

* subversion/libsvn_wc/wc_db_textbase.c
  (svn_wc__db_textbase_sync): If read access is unauthorized, ignore the
    error and continue even though we failed to fetch the textbase.

Modified:
    subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_textbase.c
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/authz_tests.py

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_textbase.c
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_textbase.c?rev=1898184&r1=1898183&r2=1898184&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_textbase.c (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_wc/wc_db_textbase.c Fri Feb 18 15:03:18 2022
@@ -330,6 +330,13 @@ svn_wc__db_textbase_sync(svn_wc__db_t *d
                                      hydrate_baton, cancel_func, cancel_baton,
                                      checksum, repos_root_url, repos_relpath,
                                      revision, iterpool);
+              /* If read access is unauthorized, for some operations we need
+               * to continue even though we failed to fetch the textbase. */
+              if (err && err->apr_err == SVN_ERR_RA_NOT_AUTHORIZED)
+                {
+                  svn_error_clear(err);
+                  err = SVN_NO_ERROR;
+                }
               if (err)
                 return svn_error_compose_create(err, svn_sqlite__reset(stmt));
             }

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/authz_tests.py?rev=1898184&r1=1898183&r2=1898184&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/authz_tests.py Fri Feb 18 15:03:18 2022
@@ -1613,7 +1613,6 @@ def authz_log_censor_revprops(sbox):
           '-r1', sbox.repo_url])
 
 @Skip(svntest.main.is_ra_type_file)
-@Wimp("Applying delta to a local mod needs access to the text base")
 def remove_access_after_commit(sbox):
   "remove a subdir with authz file"