0


I want to make svn to send an email after each commit with info about revision, changed files, etc. I'm grabbing data that I want to send by using svn log command. I've edited post-commit template and it works fine but only when I call it from the terminal or when I provide --username and --password. If it's called by svn I receive an empty email. Is it a problem with permissions to svn log command? Any ideas how to make it work?

ad_amin
  • 36
  • 1
  • 6
  • Doesn't [svnnotify](http://search.cpan.org/~dwheeler/SVN-Notify-2.83/lib/SVN/Notify.pm) do an easier job for you? – Volker Stolz Dec 01 '11 at 09:51
  • I've looked into that but if there's a way to make it work without adding any external libraries then I would like to try that first. – ad_amin Dec 01 '11 at 10:02

2 Answers2

0

The hook runs as the local service account.

One solution is to log in with your own account and use SVN once providing your credentials. SVN will cache your credentials. Then copy your ApplicationData/Subversion folder to the %systemroot%\Documents and Settings\LocalService\ApplicationData\Subversion folder ( in windows 2003 server) That will copy your encrypted credentials from your cache to the localService's cache.

I use Apache's authentication to restrict access to the server. If you are doing that then another solution is to specify the repository path using a URL like File:// instead of http://. That type of repository access does not require authentication.

maddoxej
  • 1,662
  • 13
  • 19
  • None of above worked for me. First one didn't because I work on Linux. Second one because I do need authentication but I wanted it to be somehow inherited from authentication that is done for svn commit. – ad_amin Dec 02 '11 at 09:02
0

I've found the solution. I'm using svnlook command instead of svn log and it works fine.

Details at: http://svn.haxx.se/users/archive-2007-11/0281.shtml

ad_amin
  • 36
  • 1
  • 6