svn: system(’vi svn-commit.tmp’) returned 256
some-mac user$ svn ci some-file.M
svn: Commit failed (details follow):
svn: system(’vi svn-commit.tmp’) returned 256
I hate it, how I hate this. It just happened two times in a row, unbelievable! How the heck could Apple’s engineers think one can work with such kind of bugs in the system and/or tools?!?

July 21st, 2009 at 21:15
I know the cause, but not the solution: The problem is caused when you enter an invalid command in vim - it seems to tell vim ’something went wrong in this session’ so even if you do end up saving correctly vim still exits with 256. This manifests itself for me when I type “:Wq” instead of “:wq”, since “W” is not a valid vim command
I really wish I knew how to tell vim to stop doing this.
July 22nd, 2009 at 11:12
Interesting. I had the “feeling” it more often occurred when I used C-z (Ctrl-z) to SIGSTOP the editor into the background — for example to re-run “svn diff” to re-review the changes and/or even edit last-minute spotted typos away. Maybe it is indeed not some broken process handling and just their shipped vim returning wrong exit codes? Have to check by using another editor for the log messages for some weeks:-)
January 5th, 2010 at 21:51
Did you get this fixed, I have the exact problem (although substitute emacs with vi…not sure why)
January 5th, 2010 at 22:00
No. It just happened today three times in a row under Mac OS X 10.6.2. Still vi, though, …
September 4th, 2010 at 2:15
I just got the same error on a 10.6.4 system and solved it by setting SVN_EDITOR=vi in my .bashrc file. Hope that helps.
September 4th, 2010 at 12:42
Not really – I use vi as EDITOR in my ~/.profile for years and still get this error daily. I think it has to do that Apple’s patched vi does sometimes return an error code although one intended to save the file and leave the editor cleanly. I get the impression that when you ESC out of the editing mode, or hit some other key that has no binding Apple’s patched vi returns and non-0 exit code, … and thus let svn commit abort.