If you get the error message "svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was found" and want to know how to fix it, both temporarily and permanently, read on.
The problem here is a missing environmental variable missing, dont get too scared about that, its not at all complex.
In the short term, you can type the following in the shell, to correct this temporarily and get your commit done use the export VARIABLE method, example shown belown
bigmac:~ neil$ export SVN_EDITOR=vi
To test it has worked you can use the echo command, example below
bigmac:~ neil$ echo $SVN_EDITOR
vi
The permanent fix it to set up your shell properly, my examples use the bash shell, hopefully your system does too
Step 1)
If you want to set the variable system wide you will be working with the file /etc/profile
If you want to set the variable for your personal shell, edit .bash_profile in your home directory or ~/.bash_profile
Step 2)
Edit the file chose in step one and add the next line, try to find similar export or path statements to place them into:
export SVN_EDITOR=vi
That's it, your done and it should be fixed permanently now in your system wide settings if you chose /etc/profile or your own personal profile in .bash_profile
Here is my .bash_profile
export EDITOR=vi
export SVN_EDITOR=vi
export PATH=/opt/local/bin:/opt/local/sbin:/Users/neil/bin:~/bin:/opt/local/bin/:$PATH
export MANPATH=/opt/local/share/man:$MANPATH
Assuming that vi is your editor, it could be pico, nano, emacs or your favourite edit there
In order for the changes to get noticed you need to source your profile, by issues a "." (dot) .yourprofile ( should be .bash_profile )
bigmac:~ neil$ . .bash_profile
Environmental variables are a feature of the shell, the env command display all the variables, see the example below where the output is processed with egrep to show either EDITOR or VISUAL
bigmac:~ neil$ env | egrep "EDITOR|VISUAL"
SVN_EDITOR=vi
EDITOR=vi





