Easiest/best way to set up SVN commit emails?

前端 未结 4 1966
耶瑟儿~
耶瑟儿~ 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:49

    Although this question is a bit old, just thought I would leave my opinion for those coming here from Google:

    I've considered the solutions mentioned here. The commit-email.pl was both easier and better working for me. However, I find both solutions lacking proper formatting.

    Thus, the svnnotify package seems to produce well-enough formatted and colored emails for me.

    On Debian/Ubuntu systems you can install it by typing:

    apt-get install libsvn-notify-perl
    

    Then, if you are gonna send emails to Gmail accounts, due to odd CSS support in Gmail, I would strongly recommend applying the patch found here, which means:

    • Download HTML.pm and ColorDiff.pm
    • Replace with them /usr/share/perl5/SVN/Notify/HTML.pm and /usr/share/perl5/SVN/Notify/HTML/ColorDiff.pm, respectively.

    And finally, setup the post-commit hook script the usual way:

    # email notifications for commits
    /usr/bin/svnnotify --repos-path "$REPOS" --revision "$REV" \
        --to your.email@address.com \
        --from from.email@address.com \
        --with-diff \
        --subject-cx \
        --subject-prefix 'Your Project Name: ' \
        --handler HTML::ColorDiff \
        --css-inline
        2>&1 &
    
    exit 0
    

提交回复
热议问题