You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kevin Old <ke...@gmail.com> on 2005/03/01 03:57:38 UTC
Weird commit-email.pl issues
Hello everyone,
I've searched the archives for hours and still can't get the
post-commit and commit-email.pl working correctly.
First, I'm doing all this on a test box running FC1 with subversion 1.1.3.
I have a test repository in /svnrep/testproj.
My post-commit file looks like:
REPOS="$1"
REV="$2"
echo $REPOS $REV >> /tmp/svn-log
/usr/bin/perl $REPOS/hooks/commit-email.pl "$REPOS" "$REV" -m
"testproj.*" --from kold@kold.homelinux.com kevinold@gmail.com
echo "end of commit - email should be sent" >> /tmp/svn-log
/tmp/svn-log looks like:
/svnrep/testproj 14
end of commit - email should be sent
I'm running everything as root right now and am accessing my
repository over svn+ssh.
Here's the weird part:
Currently, my repository is up to revision 14, and if I were to
execute via the command line "./post-commit /svnrep/testproj 14" I'd
be returned to the command line and the two lines would be printed in
/tmp/svn-rep, but no email would be sent.
I discovered by mistake that if I put an invalid revision (i.e. 15) an
email would be sent that looks like this:
Author: /svnrep/testproj/hooks/commit-email.pl: `/usr/bin/svnlook info
/svnrep/testproj -r 15' failed with this output:
Date: svn: No such revision 15
New Revision: 15
Modified:
Log:
/svnrep/testproj/hooks/commit-email.pl: `/usr/bin/svnlook diff
/svnrep/testproj -r 15' failed with this output:
svn: No such revision 15
This is too weird....
Can anyone offer help?
Any help is appreicated!
Kevin
--
Kevin Old
kevinold@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Weird commit-email.pl issues
Posted by Kevin Old <ke...@gmail.com>.
Jochen,
On Tue, 01 Mar 2005 11:07:33 +0100, Jochen Wendebaum
<jo...@wendebaum.de> wrote:>
> perl /svnrep/testproj/hooks/commit-email.pl /svnrep/testproj 14 --from
> kold@kold.homelinux.com kevinold@gmail.com
>
> What happens?
Well, I ran your statement above and the email went through
immediately. I looked in my post-commit and I had -m "testproj.*"
before the from email. Tried that on the command line and the script
"completed", but no email was sent.
I took it out of my post-commit and everything works upon commits.
Thanks for your help,
Kevin
--
Kevin Old
kevinold@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Weird commit-email.pl issues
Posted by Jochen Wendebaum <jo...@wendebaum.de>.
Hello Kevin,
On Tue, 01 Mar 2005 15:34:17 +0100, Kevin Old <ke...@gmail.com> wrote:
>> perl /svnrep/testproj/hooks/commit-email.pl /svnrep/testproj 14 --from
>> kold@kold.homelinux.com kevinold@gmail.com
>>
>> What happens?
>
> Well, I ran your statement above and the email went through
> immediately. I looked in my post-commit and I had -m "testproj.*"
> before the from email. Tried that on the command line and the script
> "completed", but no email was sent.
>
> I took it out of my post-commit and everything works upon commits.
>
Your repository sits in /svnrep/testproj and is called 'testproj'. The -m
switch looks _inside_ the repository for the regex. So, an email would
only be sent if you had a folder "testproj" in the repository and would
commit to this directory.
Example:
Repository in /svnrep/repos
Structure of the repos:
repos
|
|-- project1
|
|-- project2
:
To get any commit emailed, you run
.../perl .../commit-email.pl "$REPOS" "$REV" whatever@gmail.com
To get only commits to project2, you write
.../perl .../commit-email.pl "$REPOS" "$REV" -m "project2.*"
whatever@gmail.com
The example in the previous post from me (from the 24th of Feb) was for a
setup with several repositories.
Regards,
Jochen Wendebaum
jochen@wendebaum.de
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Weird commit-email.pl issues
Posted by Jochen Wendebaum <jo...@wendebaum.de>.
> I discovered by mistake that if I put an invalid revision (i.e. 15) an
> email would be sent that looks like this:
So email sending itself works.
> Currently, my repository is up to revision 14, and if I were to
> execute via the command line "./post-commit /svnrep/testproj 14" I'd
> be returned to the command line and the two lines would be printed in
> /tmp/svn-rep, but no email would be sent.
Try to execute the commit-email script manually and look what happens...
Try to play around with the command line arguments (skip especially the
-m). Do you get any emails?
Try
perl /svnrep/testproj/hooks/commit-email.pl /svnrep/testproj 14 --from
kold@kold.homelinux.com kevinold@gmail.com
What happens?
Regards,
Jochen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org