Alex Stanev Andreas Maier Werner Jäger

This is a supplement to the official SourceForge SVN docs

Adding an svnnotify hook

In general, hooks can be added to SVN repositories on the new (since 2012) SourceForge system via the Shell Service. Once logged into a shell, the file you'll generally want to add the svnnotify hook to will be: /home/svn/p/{projectname}/{reponame}/hooks/post-commit-user. This is a user-specific post-commit hook that typically contains only the svnnotify hook. Other hooks are in the post-commit file in the same directory; make sure you do not remove/modify those (if you do, the code browser will stop updating).

You can customize the svnnotify options to your liking, but to get you started, the following invocation of svnnotify will most closely mirror the svnnotify hook provided for classic (before 2012) projects.

/usr/lib64/subversion/contrib/hook-scripts/svnnotify \
--set-sender \
--repos-path "$1" \
--revision "$2" \
--to "{commit-list-email}" \
--subject-prefix " SVN: {projectname}:" \
--subject-cx \
--no-first-line \
--with-diff \
--viewcvs-url "{projectname}/{reponame}/%s" \
--user-domain "" \
-l /usr/bin/svnlook \
--max-diff-length 100000


  • {projectname} is the Unix name of your SourceForge project as shown in Admin -> Metadata -> Unixname.
  • {reponame} is the repository name (typically code); it is also used in the code URL as the URL segment after the project name.
  • {commit-list-email} is the email address of the mailing list to which the commit messages will be sent.

If you do not want to generate a diff listing as part of each commit message, remove the --with-diff option.


  • w pasman
    w pasman

    "A classic style SourceForge svn repository is automatically created with all new projects, even SourceForge 2.0 Beta projects. This isn't supported and the repository needs to be moved to the SourceForge 2.0 Beta repository system."

    I just made a new project and seem to have this problem. But this really puzzles me, I mean if sourceforge can not handle the classic style repo, why does it then create it by default? I have been messing around for hours now just to share my stupid simple project properly!