Trying to open a locked branch in read mode, results in a 'pre-commit' error

Problem Description

When trying to open a locked branch in read mode, or when trying to create a new branch from a base locked branch, you may receive an error like this or similar to it:

screen-shots_stream_creation.png

 

Root Cause

The Studio .log file indicates that the SVN is configured with a pre-commit hook that is looking for a file that is not available, so the commit fails, as shown below:

!MESSAGE 2018-04-27 07:19:13,293 WARN  org.talend.commons.exception.CommonExceptionHandler  - org.tigris.subversion.javahl.ClientException: svn: E165001: Commit failed (details follow):
svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output:
/var/www/svn/WFAN_PRJ/hooks/pre-commit: line 100: changed: command not found
/var/www/svn/WFAN_PRJ/hooks/pre-commit: line 101: changed: command not found
/var/www/svn/WFAN_PRJ/hooks/pre-commit: line 102: changed: command not found
/var/www/svn/WFAN_PRJ/hooks/pre-commit: line 103: changed: command not found
/var/www/svn/WFAN_PRJ/hooks/pre-commit: line 104: changed: command not found
svn: E175002: MERGE of '/repos/WFAN_PRJ/branches/8.0.14.TalendUpgradeTest/process/Core/TP/UserSynchronization/USER_SYNC_JOBS': 500 Internal Server Error (xxx)

!STACK 0
org.talend.commons.exception.PersistenceException: org.tigris.subversion.javahl.ClientException: svn: E165001: Commit failed (details follow):
svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output:
/var/www/svn/WFAN_PRJ/hooks/pre-commit: line 100: changed: command not found
/var/www/svn/WFAN_PRJ/hooks/pre-commit: line 101: changed: command not found
/var/www/svn/WFAN_PRJ/hooks/pre-commit: line 102: changed: command not found
/var/www/svn/WFAN_PRJ/hooks/pre-commit: line 103: changed: command not found
/var/www/svn/WFAN_PRJ/hooks/pre-commit: line 104: changed: command not found
svn: E175002: MERGE of '/repos/WFAN_PRJ/branches/8.0.14.TalendUpgradeTest/process/Core/TP/UserSynchronization/USER_SYNC_JOBS': 500 Internal Server Error (xxxx)
	at org.talend.repository.svnprovider.SvnEclipseHandler.commit(SvnEclipseHandler.java:414)
	at org.talend.repository.svnprovider.SvnCommitAbstractStrategy.commit(SvnCommitAbstractStrategy.java:84)
	at org.talend.repository.svnprovider.SvnRepositoryFactory.commitChangesInMainThread(SvnRepositoryFactory.java:419)
	at org.talend.repository.svnprovider.SvnRepositoryFactory.executeRepositoryWorkUnit(SvnRepositoryFactory.java:340)
	at org.talend.repository.remoteprovider.RemoteRepositoryFactory.executeRepositoryWorkUnit(RemoteRepositoryFactory.java:791)
	at org.talend.core.repository.model.ProxyRepositoryFactory.executeRepositoryWorkUnit(ProxyRepositoryFactory.java:2081)
	at org.talend.rcp.intro.ApplicationWorkbenchWindowAdvisor$1.run(ApplicationWorkbenchWindowAdvisor.java:258)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.tigris.subversion.javahl.ClientException: svn: E16

 

Solution

Ask your SVN administrator to remove the configuration for the commit hook, or ensure that the script file is located in the path where it is showing as failed. In this example, the correct path is /var/www/svn/WFAN_PRJ/hooks/pre-commit.

 

Resolution (if applicable)

Try using a standard Subversion client. For example, you can easily manage the content of your repositories using the Repository Browser in TortoiseSVN or using a standard Subversion CommandLine client.

 

Create repository folders using the svn mkdir command by performing with the following steps:

  1. Start VisualSVN Server Manager.
  2. Start CommandLine interpreter using the Action > All Tasks > Start Command Prompt menu command.
  3. Created a new folder, by executing the following command in CommandLine:
    svn mkdir -m https://svn.contoso.com/svn/repository/folder

For information on how to create a branch using the client, see Garry Pilkington's web blog, Branching and Merging with TortoiseSVN.

 

If this is done it means that there is no problem with the SVN.

 

For more information on SVN commit block error, see the following documentation:

SVN Error: Commit blocked by pre-commit hook is no big deal!

https://subversion.open.collab.net/ds/viewMessage.do?dsForumId=4&dsMessageId=539295

Version history
Revision #:
10 of 10
Last update:
‎04-15-2019 06:33 AM
Updated by: