If you are trying to commit the source code in SVN very first time and you see the following error that means You have not set the correct editor for the SVN. If you look closely the SVN suggests the possible fixes.
svn commit svn: Commit failed (details follow): svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was found
You can use either of the following options.
- Set the one of the following global variables’ value in
~/.bashrcfile. The value can be your favorite editor command e.g vim, emac, nano, gedit etc.
export SVN_EDITOR=vim export VISUAL=vim export EDITOR=vim
Once the above line is set in the
~/.bashrcfile, then run the following command.
Now try to run SVN commit command again. This time SVN will ask you to provide the commit message in the editor. You can provide the commit message, save it, and exit.
- If you don’t like setting the global variable, you can provide the editor command during the execution of
svn commitcommand like as following.
svn commit --editor-cmd vim
In the above command I have specified
vim. You can specify your favorite editor command.
- There is another shortcut, you can provide the commit message inline.
svn commit -m "Your commit message!"
Hope one of the above solutions will fix your problem. If you have figured out other way to fix it, then please share it in the comment section. If you like this post, please share it using social media buttons given on the left side of this page. Please feel free to leave your comments or suggestions about the above post or the website. Thank you.