You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2013/05/22 21:33:22 UTC
svn commit: r1485366 - in /subversion/branches/1.7.x: ./ STATUS
subversion/libsvn_wc/update_editor.c
Author: svn-role
Date: Wed May 22 19:33:22 2013
New Revision: 1485366
URL: http://svn.apache.org/r1485366
Log:
Merge r1465975 from trunk:
* r1465975
Replace assertions that trigger in the wild with proper error messages.
Justification:
User-friendliness, see http://svn.haxx.se/users/archive-2013-04/0064.shtml
Showing the problematic path will help with figuring out the problem.
Votes:
+1: stsp, breser
+1: danielsh (should we avoid svn_dirent_local_style in this case, i.e.,
print the literal value that nodes.local_relpath is expected
to contain?)
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/libsvn_wc/update_editor.c
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1465975
Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1485366&r1=1485365&r2=1485366&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Wed May 22 19:33:22 2013
@@ -176,14 +176,3 @@ Veto-blocked changes:
Approved changes:
=================
- * r1465975
- Replace assertions that trigger in the wild with proper error messages.
- Justification:
- User-friendliness, see http://svn.haxx.se/users/archive-2013-04/0064.shtml
- Showing the problematic path will help with figuring out the problem.
- Votes:
- +1: stsp, breser
- +1: danielsh (should we avoid svn_dirent_local_style in this case, i.e.,
- print the literal value that nodes.local_relpath is expected
- to contain?)
-
Modified: subversion/branches/1.7.x/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/update_editor.c?rev=1485366&r1=1485365&r2=1485366&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/update_editor.c Wed May 22 19:33:22 2013
@@ -1579,16 +1579,29 @@ check_tree_conflict(svn_wc_conflict_desc
if (reason == svn_wc_conflict_reason_edited
|| reason == svn_wc_conflict_reason_deleted
|| reason == svn_wc_conflict_reason_replaced)
- /* When the node existed before (it was locally deleted, replaced or
- * edited), then 'update' cannot add it "again". So it can only send
- * _action_edit, _delete or _replace. */
- SVN_ERR_ASSERT(action == svn_wc_conflict_action_edit
- || action == svn_wc_conflict_action_delete
- || action == svn_wc_conflict_action_replace);
+ {
+ /* When the node existed before (it was locally deleted, replaced or
+ * edited), then 'update' cannot add it "again". So it can only send
+ * _action_edit, _delete or _replace. */
+ if (action != svn_wc_conflict_action_edit
+ && action != svn_wc_conflict_action_delete
+ && action != svn_wc_conflict_action_replace)
+ return svn_error_createf(SVN_ERR_WC_FOUND_CONFLICT, NULL,
+ _("Unexpected attempt to add a node at path '%s'"),
+ svn_dirent_local_style(local_abspath, scratch_pool));
+ }
else if (reason == svn_wc_conflict_reason_added)
- /* When the node did not exist before (it was locally added), then 'update'
- * cannot want to modify it in any way. It can only send _action_add. */
- SVN_ERR_ASSERT(action == svn_wc_conflict_action_add);
+ {
+ /* When the node did not exist before (it was locally added),
+ * then 'update' cannot want to modify it in any way.
+ * It can only send _action_add. */
+ if (action != svn_wc_conflict_action_add)
+ return svn_error_createf(SVN_ERR_WC_FOUND_CONFLICT, NULL,
+ _("Unexpected attempt to edit, delete, or replace "
+ "a node at path '%s'"),
+ svn_dirent_local_style(local_abspath, scratch_pool));
+
+ }
/* A conflict was detected. Append log commands to the log accumulator