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?!?

6 Responses to “svn: system(’vi svn-commit.tmp’) returned 256”

  1. Alec Says:

    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.

  2. René Says:

    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:-)

  3. Tim Says:

    Did you get this fixed, I have the exact problem (although substitute emacs with vi…not sure why)

  4. René Says:

    No. It just happened today three times in a row under Mac OS X 10.6.2. Still vi, though, …

  5. luis Says:

    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.

  6. René Says:

    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.

Leave a Reply