当前位置: 代码迷 >> CVS/SVN >> 没设置 SVN_EDITOR,VISUAL 或 EDITOR 环境变量"的解决方
  详细解决方案

没设置 SVN_EDITOR,VISUAL 或 EDITOR 环境变量"的解决方

热度:8606   发布时间:2013-02-26 00:00:00.0
没有设置 SVN_EDITOR,VISUAL 或 EDITOR 环境变量"的解决方
  作者:zhanhailiang 日期:2012-12-06

Linux环境下, svn ci文件时报错:

zhanhailiang@linux-06bq:~/public_html/itravel2> svn ci trunk/htdocs/help/index.phpsvn: 提交失败(细节如下): svn: 无法使用外部编辑器获得日志信息;考虑设置环境变量 $SVN_EDITOR,或者使用 --message (-m)--file (-F) 选项svn: 没有设置 SVN_EDITOR,VISUAL 或 EDITOR 环境变量,运行时的配置参数中也没有 “editor-cmd” 选项

解决方法:在个人目录下编辑.bash_profile文件, 添加SVN_EDITOR环境变量即可:

export SVN_EDITOR=vim

SVNBook第217页专门指明该问题:

字符集转换错误当使用Subversion,你或许会碰到一个字符集转化关联的错误:svn: Can't convert string from native encoding to 'UTF-8':...svn: Can't convert string from 'UTF-8' to native encoding:...Errors such as this typically occur when the Subversion client has received a UTF-8 string fromthe repository, but not all of the characters in that string can be represented using the encodingof the current locale. For example, if your locale is en_US but a collaborator has committed aJapanese filename, you're likely to see this error when you receive the file during an svn update.The solution is either to set your locale to something that can represent the incoming UTF-8data, or to change the filename or log message in the repository. (And don't forget to slap yourcollaborator's hand—projects should decide on common languages ahead of time so that allparticipants are using the same locale.)
  相关解决方案