2012年2月23日 星期四

SUBVERSION (SVN) NOTIFY FOR WINDOWS simple configuration

Home page: http://subversionnotify.com/default.aspx
Download Link: http://sourceforge.net/projects/svn-notify/
Manual: http://subversionnotify.com/Documents/SubversionNotify_Manual.htm

Install:
  1. Download the latest version of Subversion Notify from SourceForge.net
  2. Unzip the package into the directory of your choice
  3. Copy the included pre-commit.bat, post-commit.bat and pre-revprop-change.bat to the hooks folder of your repository
  4. Edit the batch files to correctly reflect the installation location of the SubversionNotify.exe file you just extracted.

Configure the SubversionNotify.cfg file. Copy the following to  SubversionNotify.cfg. Then modify the blue part.

<?xml version="1.0" standalone="yes"?>
<subversionNotifyConfig xmlns="http://www.mckechney.com/SubversionNotifyConfig.xsd" LoggingLevel="INFO" MaximumEMailSizeInMb="5" MaximumEmailSubjectChars="255">
    <!-- Basic configuration of where to locate the SVN executables -->
    <SVNConfig ExePath="C:\Program Files\Subversion\bin\svnlook.exe" />
     
    <!-- Configure your mail server. Needed for e-mail notifications -->
    <MailServer Name="smtp.mydomain.com" Username="" Password="" ADGlobalCatalog="mydomain.com" FromAddress="fromaddress@mydomain.com"/>
     
    <!-- An example 2-types of e-mail: to a specific user and to a distribution group. Also demonstrates custom e-mail formats.-->
    <RepoPathConfig ControlledPaths="/">
       <MailTo EMailGroupName="Managers"  EMailType="HTML" />
   </RepoPathConfig>


    <EMailGroup Name="Managers">
        <EMail Address="email3@mydomain.com" />
        <EMail Address="email4@mydomain.com" />
    </EMailGroup>


</subversionNotifyConfig>

2012/08/17 update:
SVN 發 mail 的觸發點是靠 Repository 裡面的 hooks。
如果是 commit 後的動作,必須修改 post-commit.bat。
在 batch file 可以指定用某一個路徑的 SubversionNotify.exe,如果有多份 SubversionNotify.exe 就必須各自修改 SubversionNotify.cfg。

沒有留言:

張貼留言