cutmail's blog

write the code

svnでCould not use external editor to fetch log messageと出たら

svnでコミットしようとして、svn ciとやったらなぜか下記のようなエラーが出た。

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 is set, and no 'editor-cmd' run-time configuration option was found

調べたら、svnで使用するエディターが設定されていないようだ。
設定するには、シェルのconfigファイルに記述してやればいい。

zshの場合は、~/.zshrcに下記のように記述する。

export SVN_EDITOR="/usr/bin/vim"

もちろん、bashを使っているのであれば、~/.bash_profileに記述してやればよい。