学以致用

focus on Python , C++, and some interest in Go and R

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

计划在团队中采用code review,因为一直是用git作为代码管理的,所以毫无疑问的就选择了gerrit作为code review的工具。本以为很容易就能配置通过,但在配置的时候还是碰到了不少问题,比如中文编码,发送邮件等等。折腾了小半天,终于搞定,在此记录如下,以期对他人有所帮助。
一、中文编码的问题
为妥善解决中文编码的问题,对所有git repository做如下约定:
  a、所有文本文件都必须存储成utf8编码
  b、对git做如下设置:
    git config --global core.quotepath false
    git config --global i18n.logoutputencoding utf8
    git config --global i18n.commitencoding utf8
安装gerrit的时候对于数据库的编码设定为utf8
二、邮件的问题
  对gerrit的sendmail设置如下:
  [sendemail]
        enable = true
        smtpServer = smtp.gmail.com
        smtpServerPort = 465
        smtpEncryption = ssl
        smtpUser = your_account@gmail..com
        smtpPass = your_password
        sslVerify = false
        from = Code Review < your_account@gmail..com>
  

  

posted on 2012-04-19 15:25  Jerry.Kwan  阅读(5837)  评论(3编辑  收藏  举报