Solution to "svn: E235000: In file 'subversion/libsvn_wc/update_editor.c' line 1583: assertion failed"

このエントリーをはてなブックマークに追加

Subversion 1.7.5 's fatal bug

Subversion client (svn) 1.7.5 has a fatal bug in "svn switch" command.
(see http://subversion.tigris.org/issues/show_bug.cgi?id=4160 )

This bug causes an error like this.
svn: E235000: In file 'subversion/libsvn_wc/update_editor.c' line 1583:
 assertion failed (action == svn_wc_conflict_action_edit || action == svn_wc_conflict_action_delete
 || action == svn_wc_conflict_action_replace)
But don't worry, now I have found solutions.
I tell you how to reproduce this error and how to resolve this problem!

Minimum operation to reproduce the bug

$ svn mkdir $REPO/svnbug -mprapare
Committed revision 27.
$ svn co $REPO/svnbug
Checked out revision 27.

$ cd svnbug/

$ echo 1 2 3 > file1 && touch file2
$ svn add file*
A         file1
A         file2

$ svn ci -m"add files"
Adding         file1
Adding         file2
Transmitting file data ..
Committed revision 28.

$ echo 2 3 4 > file1
$ svn ci -m"modify file1"
Sending        file1
Transmitting file data .
Committed revision 29.

$ svn del file1
D         file1

$ svn ci -m"delete file1"
Deleting       file1
Committed revision 30.

$ ln -s file2 file1
$ svn add file1
A         file1
$ svn ci -m"add a  symlink"
Adding         file1
Transmitting file data .
Committed revision 31.

$ svn up
$ svn sw $REPO/svnbug -r 29
svn: E235000: In file 'subversion/libsvn_wc/update_editor.c' line 1583:
 assertion failed (action == svn_wc_conflict_action_edit || action == svn_wc_conflict_action_delete
 || action == svn_wc_conflict_action_replace)
Now you CANNOT swtich from -r 31 to -r 29, vice verusa.

But don't worry, you have 2 solutions.

Solution 1: svn switch one by one

Odd thing is , you can avoid this error by swtiching step by step ;) !
Like this:
$ svn cleanup 
$ svn sw $REPO/svnbug -r 31
$ svn sw $REPO/svnbug -r 30
$ svn sw $REPO/svnbug -r 29
And also you can switch from -r29 to -r30, and from -r30 to -r31.
But you can NEVER switch from -r 29 to -r 31

Solution 2: svn up -r

"svn up" command always makes success.
$ svn cleanup 
$ svn up -r 31
$ svn up -r 29
$ svn up -r 31
You did it!

A dirty patch

You can avoid error by this patch.
(not perfect ,but usable)
$ diff -u update_editor.orig update_editor.c 
--- update_editor.orig 2012-04-26 13:02:08.000000000 +0900
+++ update_editor.c  2012-05-30 02:27:24.000000000 +0900
@@ -1578,9 +1578,8 @@
     /* 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);
+    ;
+
   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. */
購読する

最近の人気記事

人気記事

このブログ記事について

ひとつ前の記事は「[Apache/SSL]request body exceeds maximum size (131072) for SSL bufferエラーの対処法」です。

次の記事は「Javaで、空配列を作る方法」です。

過去に書かれたものは過去記事一覧で見られます。