作者:zhanhailiang 日期:2012-12-06
Linux环境下, svn ci文件时报错:
zhanhailiang@linux-06bq:~/public_html/itravel2> svn ci trunk/htdocs/help/index.php svn: 提交失败(细节如下): 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 from the repository, but not all of the characters in that string can be represented using the encoding of the current locale. For example, if your locale is en_US but a collaborator has committed a Japanese 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-8 data, or to change the filename or log message in the repository. (And don't forget to slap your collaborator's hand—projects should decide on common languages ahead of time so that all participants are using the same locale.)
本文解决Linux环境下使用SVN客户端时遇到的SVN编辑器设置错误和字符集转换错误问题。通过在个人目录下设置SVN_EDITOR环境变量和调整本地字符集设置,可以有效解决这些问题。同时,详细解释了如何识别和解决由字符集不匹配导致的文件接收错误。
748

被折叠的 条评论
为什么被折叠?



