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

  作者: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.)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值