Easiest/best way to set up SVN commit emails?

前端 未结 4 1972
耶瑟儿~
耶瑟儿~ 2020-12-23 14:58

I\'d like to set up commit emails on a project I\'m work on, as described here:
http://producingoss.com/en/vc.html#commit-emails

That is, use a post commit hoo

4条回答
  •  臣服心动
    2020-12-23 15:43

    We use svnmailer for this. We symlink our repository-specific post-commit hook scripts to a single script, which in turn calls svnmailer. The configuration is pretty straight forward, and with their simple.conf example configuration you can be up and running in a few minutes. Note that it is written in Python, so that is a prerequisite to installation.

    Our entire post-commit hook script is only a few lines (note that you might do other stuff in your post-commit hook, but we currently don't):

    #!/bin/sh
    
    CONFIG="/usr/local/svnmailer/default.conf"
    MAILER="/usr/bin/svn-mailer"
    
    # These are passed in by subversion
    REPOS="$1"
    REV="$2"
    
    "${MAILER}" --commit \
                --config "${CONFIG}" \
                --repository "${REPOS}" \
                --revision "${REV}" \
                --background
    

提交回复
热议问题