简体   繁体   English

提交被预提交挂钩SVN阻止

[英]Commit blocked by pre-commit hook SVN

I have subversion on my server, when i try to commit i got error like bellow : 我的服务器上有Subversion,当我尝试提交时出现了以下错误:

error creating module:org.tigris.subversion.javahi.ClientException:svn:
Commit blocked by pre-commit hook(exit code 199) with no output.
svn MERGE of '/svn/mssql/trunk':409 Conflict (http://www.domain.com)

Then i try to check on error log inside /var/log/httpd/error_log 然后我尝试检查/ var / log / httpd / error_log中的错误日志

i got error like bellow : 我收到像下面这样的错误:

Could not MERGE resource "/svn/[project name]/!svn/act/8b7476df-3701-0010-a025-c590208c08a0" into  "/svn/[project name]/trunk"

Commit blocked by pre-commit hook (exit code 199) with no output.  [409, #165001]

What is that error ? 那是什么错误?

How to solve this ? 如何解决呢?

There are two different types of pre-commit hooks: 有两种不同类型的预提交挂钩:

  • Server side: This is the standard Unix pre-commit hook. 服务器端:这是标准的Unix预提交钩子。 The hook itself lives inside the repository hooks directory. 挂钩本身位于存储库hooks目录中。 If the hook is not executable, or there is no hook script called pre-commit the hook does not run. 如果挂钩不是可执行文件,或者没有名为pre-commit的挂钩脚本,则挂钩不会运行。
  • TortoiseSVN Client Side Hooks: The hook is on the client and is specific to TortoiseSVN. TortoiseSVN客户端挂钩:该挂钩在客户端上,特定于TortoiseSVN。

When you say pre-commit hook , are you talking about the one on the server or the one on your computer? 当您说pre-commit hook时 ,您是在谈论服务器上的钩子还是计算机上的钩子 You said you modified the hook by putting exit 0 in the front. 您说您通过将exit 0放在前面来修改了该钩子。

You don't state what the hook does, or who put it there. 您没有说明钩子是做什么的,也没有说明是谁把它放在那里的。 This makes it very difficult to determine what is going wrong. 这使得很难确定出了什么问题。 There are thousands of Subversion hooks floating around doing various tasks. 有成千上万的Subversion钩子围绕着执行各种任务。 I have no idea what this one is. 我不知道这是什么。 Who set up this hook? 谁设置了这个钩子? By default Subversion has no hooks active. 默认情况下,Subversion没有活动的钩子。 Someone must have added it. 一定有人添加了它。 Who did? 谁干的?

And, why did they put this hook? 而且,他们为什么要挂这个钩子? What is this hook suppose to be accomplishing. 这个挂钩应该完成什么。 Some hooks prevent duplicate files from being added to the repository. 一些挂钩可防止将重复文件添加到存储库。 Some prevent mismatched casing. 有些可以防止套管不匹配。 Some do security, and some are just jokes. 有的做安全,有的只是开玩笑。

Post your hook on Pastebin and then come back and let us know you've updated it. 将您的钩子粘贴Pastebin上 ,然后回来,让我们知道您已更新它。 Let us know who added the hook and why. 让我们知道是谁添加了这个钩子以及为什么。

Otherwise, there's not much we can do for you. 否则,我们无能为力。

I can solve this problem with add new line on pre-commit script with following code : 我可以使用以下代码在预提交脚本上添加新行来解决此问题:

#!/bin/sh
exit 0;

After that, i can commit,update,checkout and etc :) 之后,我可以提交,更新,签出等:)

But i must add these line manually on every repository project ? 但是我必须在每个存储库项目上手动添加这些行吗? is another ide to overcome this ? 克服这个问题的另一个思路是什么?

Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM