You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/10/22 19:15:55 UTC
svn commit: r1534705 - in /subversion/branches/1.8.x: ./ STATUS
subversion/libsvn_wc/update_editor.c subversion/tests/cmdline/authz_tests.py
Author: breser
Date: Tue Oct 22 17:15:55 2013
New Revision: 1534705
URL: http://svn.apache.org/r1534705
Log:
Merge the r1520065 group from trunk:
* r1520065, r1520745
Resolve a user triggerable assertion when during an update a file external
is being replaced by a server excluded (aka absent) node. Issue 4422.
Justification:
Quite a few reports of this assertion on the users@s.a.o list since 1.7.0.
Votes:
+1: rhuijben, breser, philip
Modified:
subversion/branches/1.8.x/ (props changed)
subversion/branches/1.8.x/STATUS
subversion/branches/1.8.x/subversion/libsvn_wc/update_editor.c
subversion/branches/1.8.x/subversion/tests/cmdline/authz_tests.py
Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1520065,1520745
Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1534705&r1=1534704&r2=1534705&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Tue Oct 22 17:15:55 2013
@@ -107,10 +107,3 @@ Veto-blocked changes:
Approved changes:
=================
- * r1520065, r1520745
- Resolve a user triggerable assertion when during an update a file external
- is being replaced by a server excluded (aka absent) node. Issue 4422.
- Justification:
- Quite a few reports of this assertion on the users@s.a.o list since 1.7.0.
- Votes:
- +1: rhuijben, breser, philip
Modified: subversion/branches/1.8.x/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_wc/update_editor.c?rev=1534705&r1=1534704&r2=1534705&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_wc/update_editor.c Tue Oct 22 17:15:55 2013
@@ -3013,18 +3013,55 @@ absent_node(const char *path,
kind = svn_node_unknown;
}
- if (status == svn_wc__db_status_normal
- && kind == svn_node_dir)
+ if (status == svn_wc__db_status_normal)
{
- /* We found an obstructing working copy!
+ svn_boolean_t wcroot;
+ /* We found an obstructing working copy or a file external! */
- We can do two things now:
- 1) notify the user, record a skip, etc.
- 2) Just record the absent node in BASE in the parent
- working copy.
+ SVN_ERR(svn_wc__db_is_wcroot(&wcroot, eb->db, local_abspath,
+ scratch_pool));
- As option 2 happens to be exactly what we do anyway, lets do that.
- */
+ if (wcroot)
+ {
+ /*
+ We have an obstructing working copy; possibly a directory external
+
+ We can do two things now:
+ 1) notify the user, record a skip, etc.
+ 2) Just record the absent node in BASE in the parent
+ working copy.
+
+ As option 2 happens to be exactly what we do anyway, fall through.
+ */
+ }
+ else
+ {
+ /* The server asks us to replace a file external
+ (Existing BASE node; not reported by the working copy crawler or
+ there would have been a delete_entry() call.
+
+ There is no way we can store this state in the working copy as
+ the BASE layer is already filled.
+
+ We could error out, but that is not helping anybody; the user is not
+ even seeing with what the file external would be replaced, so let's
+ report a skip and continue the update.
+ */
+
+ if (eb->notify_func)
+ {
+ svn_wc_notify_t *notify;
+ notify = svn_wc_create_notify(
+ local_abspath,
+ svn_wc_notify_update_skip_obstruction,
+ scratch_pool);
+
+ eb->notify_func(eb->notify_baton, notify, scratch_pool);
+ }
+
+ svn_pool_destroy(scratch_pool);
+ return SVN_NO_ERROR;
+ }
}
else if (status == svn_wc__db_status_not_present
|| status == svn_wc__db_status_server_excluded
Modified: subversion/branches/1.8.x/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/tests/cmdline/authz_tests.py?rev=1534705&r1=1534704&r2=1534705&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/1.8.x/subversion/tests/cmdline/authz_tests.py Tue Oct 22 17:15:55 2013
@@ -1551,6 +1551,44 @@ def log_diff_dontdothat(sbox):
'log', ddt_url,
'-c', 1, '--diff')
+@Issue(4422)
+@Skip(svntest.main.is_ra_type_file)
+def authz_file_external_to_authz(sbox):
+ "replace file external with authz node"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ repo_url = sbox.repo_url
+
+ write_authz_file(sbox, {"/": "* = rw"})
+ write_restrictive_svnserve_conf(sbox.repo_dir)
+
+ sbox.simple_propset('svn:externals', 'Z ' + repo_url + '/iota', '')
+
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.tweak('', status=' M')
+ expected_status.add({
+ 'Z' : Item(status=' ', wc_rev='1', switched='X'),
+ })
+ svntest.actions.run_and_verify_update(wc_dir,
+ None, None, expected_status)
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'cp', repo_url + '/A',
+ repo_url + '/Z',
+ '-m', 'Add Z')
+
+ write_authz_file(sbox, {"/": "* = rw", "/Z": "* = "})
+
+ expected_status.tweak(wc_rev=2)
+
+ # ### This used to assert with
+ # ### svn: E235000: In file 'update_editor.c' line 3043: assertion failed
+ # ### (status != svn_wc__db_status_normal)
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ None, None, expected_status)
+
########################################################################
# Run the tests
@@ -1585,6 +1623,7 @@ test_list = [ None,
authz_svnserve_groups,
authz_del_from_subdir,
log_diff_dontdothat,
+ authz_file_external_to_authz,
]
serial_only = True