0

I am looking for a script such that whenever any developer do any changes in file than email should be sent to the whole group.

For that I have added the DL that is in post shutdown hook script, but my concern is that mail body should contain:

  • file names
  • along with the highlighted text that is added by developer in green colour
  • and if some text is removed then it should be shown in red colour.

I have gone through the below url in which simply it sends the mail. But in body it does not reflect the changes done to the files.

Anyone have commit notification hook script that will send email upon commit of codes?

Community
  • 1
  • 1
ndsfd ddsfd
  • 235
  • 1
  • 5
  • 13

1 Answers1

0

use svnnotify, i think this should solve your problem.

There are many options available to configure mail.

Here is the example

/usr/bin/svnnotify --revision "$REV" --repos-path "$REPOS" \ --subject-cx --subject-prefix "[Project:commit] " --max-sub-length 128 \ --with-diff --handler Alternative --alt HTML::ColorDiff \ --to 'abc@xyz.com' --from 'svn@xyz.com' --set-sender

  • Thanks a lot if possible pls can you advise what will be the complete script or you can also share some urls showing the above as an example to grasp more Thanks inadvance – ndsfd ddsfd Apr 23 '15 at 16:38
  • although i have visited this url also – ndsfd ddsfd Apr 23 '15 at 16:40
  • Here is the link [llink](http://www.scmtechblog.net/2014/07/few-pre-commit-svn-scripts-and-tricks.html) There are many pre-commit scripts as example, You just need to add following `#!/bin/bash REPO=$1 TXN=$2` then then paste the above svnnotify code. – vishal sahasrabuddhe Apr 24 '15 at 04:52