[svn] SVN Error: Commit blocked by pre-commit hook (exit code 1) with output: Error: n/a (6)

Some weird error cropped up suddenly outta nowhere and is preventing me from checking in my code via TortoiseSVN. I'm using a free account on myversioncontrol.com

This is on a Windows Vista system. It was working fine till earlier in the day. Any clue how to get things back to normal?

The Tortoise window shows this

Command: Commit  
Modified: ...\edit.php  
Sending content: ...\edit.php  
Error: Commit failed (details follow):  
Error: Commit blocked by pre-commit hook (exit code 1) with output:  
Error: n/a (6).  
Finished!:   

This question is related to svn tortoisesvn pre-commit

The answer is


This happened to me, and it was caused the absence of a comment (should say "comment required" instead of this enigmatic error at first, right...)


Recently I am also faced the same problem, while submitting my own WordPress plugin to the directory, Finally, i figured out and worked me,

Just add a comment/ Commit message. It will work,

I used TortiseSVN.


Sorry for "answering my own question", but I figured out a workaround... If we remove the newlines in the comment / commit message, it seems to work fine.


you need to add comments and associate with an artifact id with no return key at the end. for example, [artf12345] - your comments.


A pre-commit hook is something that runs on the server, so this probably has nothing to do with your local setup. It could be that you changed something in a settings panel on myversioncontrol.com that is implemented using a pre-commit hook or the myversioncontrol people made an error and added a non-functioning hook.


In my case, the solution was to remove "" (quotation mark) from commit message. Weird


I have encounter the same issue and found that i have forgot to prefix the commit message with project identifier. Project identifier is must in our case followed by the commit message. So at the server end it doesn't found the prefix and raised the issue.


Could it be that you have not entered a commit message? According to their twitter feed: "New functionality added. Block users from committing work without writing a log message. Find in the resources section of your control panel".


SOLUTION for WORDPRESS PLUGINS:

I think, get_option() returns FALSE (instead of EMPTY). So, check your plugin. Instead of:

if (empty(get_option('smth')))

there should be:

if (!get_option('smth'))

I got the error as, "svn: Commit blocked by pre-commit hook (exit code 1) with output: Failed with exception: Lost connection to MySQL server at 'reading initial communication packet', system error: 104."

I tried 'svn commit' after 'svn cleanup'. And It works fine!.


If you are getting following exception:

Error: Commit failed (details follow):
Error: Commit blocked by pre-commit hook (exit code 1) with output:
Error: svnlook: Path 'trunk/Development/ProjectName' is not a file

Then first check-in all the the directories and then all the files. It will work.