Hi, there:
I successfully install and run subversion (0.21.0) on Linux (redhat
7.2). However, I still have some questions
on post-commit/commit-email functionality.
Followings are my detail test on Subversion:
1. Install Suberversion server on machine 172.18.24.211 (linux) and
Subversion clients on window NT4.0
For the communication/access between server and clients, I set
up apache2.0.45/WebDAV. So I can
access repository through http.
2. Create a repository on Subversion server
svn create /svn/repos/R3
3. Retsrat httpd (web server)
On httpd.conf, I add following directive:
<Location /svn/repos/R3>
DAV svn
SVNPath /svn/repos/R3
</Location>
And then re-start webserver.
4. On Subversion server (/svn/repos/R3/hooks), I do:
a. copy post-comit.tmpl to post-commit and make sure it is
executable.
b. check commit-email.pl and make sure it is executable
For verifying that post-commit is hooked, I modify the
post-commit to add one line:
copy /svn/repos/R3/hooks/y.txt /sv/repos/R3/hooks/x.txt
Therefore, through checking the file x.txt, I can verify the
whether subversion server trigger
post-commit. (And "yes", it is)
5. On subversion client (window NT 4.0), I checkout R3 to my working
directory:
svn co http://172.18.24.211/svn/repos/R3
(it works well. And now I have a copy of R3 on my local
working diretcory)
6. edit and add a new file, called README
svn add README (it works.)
7. commit this change.
svn ci --force -m "commit README" (Why do I need to use
--force?)
8. Go back to subversion server. First, I get x.txt, that means
post-commit has been triggered.
BUT I DON"T receive any email, regarding this commit. Why?
9. If I execute commit-email.pl from Subversion server on the
command line,
perl commit-email.pl /svn/repos/R3 1 cwu@deltartp
then I can receive e-mail from subersion server. Therefore, I
assume that commit-email.pl works
10, Anything wrong between subversion server and post-commit? Any
configuration needs?
The post-commit hook is as following:
/********************************************
#!/bin/sh
# POST-COMMIT HOOK
#
# Here is an example hook script, for a Unix /bin/sh interpreter:
REPOS="$1"
REV="$2"
#echo "This is REPOS=$REPOS" >> y.txt
#echo "REV=$REV" >> y.txt
echo $REPOS >> y.txt
echo $REV >> y.txt
cp /svn/repos/R3/hooks/y.txt /svn/repos/R3/hooks/x.txt
#commit-email.pl "$REPOS" "$REV" commit-watchers@example.org
perl commit-email.pl "$REPOS" "$REV" cwu@deltartp.com
log-commit.py --repository "$REPOS" --revision "$REV"
/*******************************************************************
Anything wrong with post-commit?
I also try to make sure the input (REPOS and REV) from subversion server;
however, I find they are "empty".
Can anyone show me any hint to overcome this problem? Appreciate your help.
Regards,
Chien-Lung
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 14 21:57:17 2003