I've written a Perl post-commit hook that sends out emails via the Perl Net::SMTP
module. 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)
david@DaveBook.local:~/workspace/svn-cm-trunk/subversion
$ svn up
G README
Updated to revision 94.
I've played around with my post-commit script. First I wrote a simple one that just prints out a simple text message just to make sure things work. Then, I used mine and exited at various times to see where the MERGE
issue was coming from.
I got to the point in my script where I created a new Net::SMTP object:
if ($smtpUser) {
$smtp->auth( $self->SmtpUser, $self->SmtpPassword)
or croak qq(Unable to connect to mailhost "@{[$self->SmtpHost]}")
. qq( as user "@{[$self->SmtpUser]}");
}
If this line is enabled in my script, I get the MERGE
issue. Otherwise, my entire script runs more or less as expected.
I can also run the script from the command line, and everything works just fine. It's only when triggered as a post-commit hook where things fail. I've even logged in as Apache and ran the script without any problems.
What does that MERGE error mean, and why do I get it when Subversion runs the post-commit hook?