You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/09/07 11:45:14 UTC
svn commit: r1520745 - in /subversion/trunk/subversion:
libsvn_wc/update_editor.c tests/cmdline/authz_tests.py
Author: rhuijben
Date: Sat Sep 7 09:45:13 2013
New Revision: 1520745
URL: http://svn.apache.org/r1520745
Log:
Resolve issue #4422 "During update an incoming authz node where a file external
exists causes an assertion", by tweaking the specific absent handing in the
update editor. (Follow up to r1520065, which added the test for this issue)
* subversion/libsvn_wc/update_editor.c
(absent_node): Handle obstructing file externals next to the existing
directory externals handling.
* subversion/tests/cmdline/authz_tests.py
(authz_file_external_to_authz): Remove XFail marker and add issue number.
Tweak comments.
Modified:
subversion/trunk/subversion/libsvn_wc/update_editor.c
subversion/trunk/subversion/tests/cmdline/authz_tests.py
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1520745&r1=1520744&r2=1520745&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Sat Sep 7 09:45:13 2013
@@ -3010,18 +3010,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/trunk/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/authz_tests.py?rev=1520745&r1=1520744&r2=1520745&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/authz_tests.py Sat Sep 7 09:45:13 2013
@@ -1551,7 +1551,7 @@ def log_diff_dontdothat(sbox):
'log', ddt_url,
'-c', 1, '--diff')
-@XFail()
+@Issue(4422)
@Skip(svntest.main.is_ra_type_file)
def authz_file_external_to_authz(sbox):
"replace file external with authz node"
@@ -1582,11 +1582,10 @@ def authz_file_external_to_authz(sbox):
expected_status.tweak(wc_rev=2)
- # ### Currently this asserts with
- # ### svn: E235000: In file 'update_editor.c' line 3043: assertion failed (status != svn_wc__db_status_normal)
+ # ### This used to assert with
+ # ### svn: E235000: In file 'update_editor.c' line 3043: assertion failed
+ # ### (status != svn_wc__db_status_normal)
- # ### The assumed status expects that the file external is still there,
- # ### but there are many other valid ways to fix this issue.
svntest.actions.run_and_verify_update(wc_dir,
None, None, expected_status)