Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#862 How to activate SVN email notifications on our upgraded repository

self-service
Chris Tsai
None
https://sourceforge.net/projects/callflow/
callflow
2012-10-12
2012-10-03
Richard Bos
No

Our code repository was recently (last week) upgraded. On our old svn repository we had SVN email notifications active. We want / need must have this active again.

Please, activate or tell us how to activate SVN email notifications or point us to a procedure how to activate this.

Is it possible to use svnnotify for this on sourceforge?

Thanks in advance for your support.

Related

Apache Allura: Tickets: #5076

Discussion

  • Chris Tsai
    Chris Tsai
    2012-10-03

    • status: unread --> pending
    • assigned_to: Chris Tsai
     
  • Richard Bos
    Richard Bos
    2012-10-03

    They help a little. I logged in to the shell, and found the path to the commit hook. The hook is there, it seems, but it does not seem to work:

    -bash-3.2$ pwd
    /home/svn/p/callflow/code/hooks
    
    -bash-3.2$ cat post-commit     
    #!/bin/bash
    # The following is required for site integration, do not remove/modify.
    # Place user hook code in post-commit-user and it will be called from here.
    curl -s http://sourceforge.net/auth/refresh_repo/p/callflow/code/
    
    DIR="$(dirname "${BASH_SOURCE[0]}")"
    if [ -x $DIR/post-commit-user ]; then  exec $DIR/post-commit-user "$@"
    
    -bash-3.2$ cat post-commit-user 
    #!/bin/sh
    # THIS FILE IS AUTOGENERATED - DO NOT EDIT
    /var/local/mastertree/host/sfp-svn/hook-scripts/sf-svn-stats-hook.py $*
    /var/local/mastertree/host/sfp-svn/hook-scripts/keepsake -p "$1"
    /var/local/mastertree/host/sfp-svn/hook-scripts/svnnotify --repos-path "$1" --revision "$2" --to "callflow-svn@lists.sourceforge.net" --subject-prefix "SF.net SVN: callflow:" --subject-cx --no-first-line --with-diff --viewcvs-url "http://callflow.svn.sourceforge.net/callflow/?rev=%s&view=rev" --user-domain "users.sourceforge.net" --footer "This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site." -l /usr/bin/svnlook --max-diff-length 100000
    exit 0
    

    BTW: in the 1st file is stated:

    # Place user hook code in post-commit-user and it will be called from here.

    But in post-commit-user is stated:
    # THIS FILE IS AUTOGENERATED - DO NOT EDIT

    That is a contradiction!!!

     
    Last edit: Chris Tsai 2012-10-05
  • Chris Tsai
    Chris Tsai
    2012-10-05

    Edited your post so it's more legible.

    Anyway, the line about it being autogenerated was just a carry over when the hooks were copied, so you can feel free to edit the hooks as necessary.

    As for the hooks themselves, I recommend you make the following changes

    Remove these non-functional, unnecessary hooks (plus the autogenerated line):

    # THIS FILE IS AUTOGENERATED - DO NOT EDIT
    /var/local/mastertree/host/sfp-svn/hook-scripts/sf-svn-stats-hook.py $*
    /var/local/mastertree/host/sfp-svn/hook-scripts/keepsake -p "$1"
    

    Edit the svnnotify line to this:

    /usr/bin/svnnotify --repos-path "$1" --revision "$2" --to "callflow-svn@lists.sourceforge.net" --subject-prefix "SF.net SVN: callflow:" --subject-cx --no-first-line --with-diff --viewcvs-url "http://sourceforge.net/p/callflow/code/%s" --user-domain "users.sourceforge.net" --footer "This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site." -l /usr/bin/svnlook --max-diff-length 100000
    

    And, to be clear, the edits I made were removing the path for svnnotify (since it's not installed to the same path), and updating the URL for the code browser.

    Let me know if this helps!

    Regards,
    Chris Tsai, SourceForge.net Support

    PS. I've also logged a ticket with our engineering team for updating the hook scripts during migration, instead of just copying them exactly: [allura:tickets:#5076]

     

    Related

    Apache Allura: Tickets: #5076

  • Richard Bos
    Richard Bos
    2012-10-06

    Hi Chris,

    thanks for making my previous update more legible. Changing the path to svnnotify from /var/.... to /usr/bin made it work! Thanks.

    Is there a way check the svnnotify version that is used?

    Thanks for the followup (#5076) tickets. That will be usefull for many other projects!

     
  • Chris Tsai
    Chris Tsai
    2012-10-12

    Excellent, thanks for the update. By the way, for svnnotify, we're currently on 2.80

    Regards,
    Chris Tsai, SourceForge.net Support

     
  • Chris Tsai
    Chris Tsai
    2012-10-12

    • status: pending --> self-service