[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

post-commit hook problems with SMTP

From: David Weintraub <qazwart_at_gmail.com>
Date: Thu, 3 Nov 2011 12:46:52 -0400

I've written a Perl post-commit hook that emails out via SMTP. I was
getting the following error when I try to do a commit:

    Sending subversion/README
    Transmitting file data .svn: Commit failed (details follow):
    svn: MERGE of '/mfxcm/trunk/subversion': 200 OK (http://source)

The commit actually had worked, but the revision of my working copy
wasn't updated until I did a "svn up":

    $ svn commit -m"Finding what's causing commit errors. I think it's
the post-commit script"
    Sending subversion/README
    Transmitting file data .svn: Commit failed (details follow):
    svn: MERGE of '/mfxcm/trunk/subversion': 200 OK (http://source)
    $ svn up
    Updated to revision 94.

I've played around with my post-commit script, and everything is find
until I do:

        my $smtp = Net::SMTP->new(
            Host => $self->SmtpHost,
            Debug => $main::debugLevel,

Then, I get the MERGE error again. If I take out the SMTP portion of
the script, everything works just fine. If I put in starting SMTP, it

I know the script actually works because I print out the command to
execute my post-commit hook, and I can run it from the command line
without any problems. It only gets that MERGE error if run as a
post-commit hook.

What exactly does that MERGE error mean, and why do I get it when
Subversion runs the post-commit hook vs. when I run the same thing
from the command line?

David Weintraub
Received on 2011-11-03 17:47:32 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.