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.
October 19th, 2012 at 11:27
I solved this type of issue by setting this in .subversion/config
editor-cmd = cat
this will output the files that are to be committed but will not allow you to change them ….
skiping straight trough to asking if you want to preceed.
November 17th, 2012 at 13:28
Yeah, but the whole point of the “edit” option is, well, do edit the text, … I mean, after all we want a useful commit message, to later retrieve what was going on, …
As I wrote the other year, it’s probably simply that vi as shipped by Apple’s Mac OS X returns an error code after certain keyboard interaction, apparently when a keybinding was not valid or the visual mode left with ESC or so, … :-/
September 11th, 2013 at 20:27
On Mac bash, I tried to set temporarily
EDITOR=pico
and it worked.
September 11th, 2013 at 20:57
Err? Beside setting the “EDITOR” variable was already proposed above, this changes the editor to “pico”, which is not exactly what I would want to use to edit my commit messages.
As diagnosed in 2009 this is caused by “Apple’s” vim to exit with a non-zero exit code in case of there was an error in the last comment typed. I did not had the motivation to review if that is caused by an Apple specific patch to vim, a configuration option or any other kind of glitch.
September 11th, 2013 at 22:09
For long term solution, put in bash profile if using MacVim:
export SVN_EDITOR=’mvim -f’
September 11th, 2013 at 22:15
if console MacVim,
export SVN_EDITOR=’mvim -vf’
September 18th, 2014 at 11:56
what I was doing wrong is typing the “:wq” without pressing esc.
when finish editing press esc then “:wq” it did the trick for me.
hope it helps