Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336498 - Subversive ignores SVNKit errors on commit (server side 'pre-commit' failed with exit code 1)
Summary: Subversive ignores SVNKit errors on commit (server side 'pre-commit' failed w...
Status: RESOLVED DUPLICATE of bug 338641
Alias: None
Product: Subversive
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Igor Burilo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-07 07:39 EST by J. Ulbts CLA
Modified: 2011-03-08 04:27 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description J. Ulbts CLA 2011-02-07 07:39:15 EST
Build Identifier: 20100218-1602

Subversive SVN 1.6 is used ('2.2.2.I20101203-17' of Java HL and '2.2.2.I20110124-17' for other Subversive components)!

On the server a pre-commit script is executed to check the content of the commit (change) message. If no commit/change message is entered the commit will fail. The pre-commit script will return with a description and the exit code 1 (1=error occurred; 0=no error). I also tried it with '-1' for the error but this doesn't change anything.

It work with the native JavaHL SVN Connector! I get a dialog showing that the commit failed including the error message the pre-commit script writes.
If SVNKit (tried 1.3.3 r6649 and the current 1.3.5 r7406) is selected as SVN Connector NO error is shown. You can only see the commit didn't work because of the ">" tag in front of your sourcecode which is indicating that changes haven't been committed yet.

Here is the output you find in the ".metadata\.log" of the workspace directory.

First the log output when 'SVNKit' is used:
=========================================
!SESSION 2011-02-07 13:13:02.562 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

!ENTRY org.eclipse.team.svn.core.svnnature 2 0 2011-02-07 13:13:51.451
!MESSAGE SVN: '0x00000114: Commit' operation finished with error
!SUBENTRY 1 org.eclipse.team.svn.core.svnnature 2 0 2011-02-07 13:13:51.451
!MESSAGE svn: Commit failed (details follow):
svn: Commit blocked by pre-commit hook (exit code 1) with output:
Your commit has been blocked because you didn't enter a comment. Empty commit 
messages are NOT allowed! Write a log message describing the changed you made 
and try again. 



Here the log output when 'JavaHL' is used:
========================================
!SESSION 2011-02-07 13:11:48.058 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

!ENTRY org.eclipse.team.svn.core.svnnature 4 0 2011-02-07 13:12:42.509
!MESSAGE SVN: '0x00000114: Commit' operation finished with error
!SUBENTRY 1 org.eclipse.team.svn.core.svnnature 4 0 2011-02-07 13:12:42.509
!MESSAGE Some of selected resources were not committed.
!STACK 0
org.eclipse.team.svn.core.connector.SVNConnectorException: A repository hook failed
svn: Commit failed (details follow):
svn: Commit blocked by pre-commit hook (exit code 1) with output:
Your commit has been blocked because you didn't enter a comment. Empty commit 
messages are NOT allowed! Write a log message describing the changed you made 
and try again. 


	at org.polarion.team.svn.connector.javahl.JavaHLConnector.handleClientException(JavaHLConnector.java:1488)
	at org.polarion.team.svn.connector.javahl.JavaHLConnector.commit(JavaHLConnector.java:339)
	at org.eclipse.team.svn.core.extension.factory.ThreadNameModifier.commit(ThreadNameModifier.java:98)
	at org.eclipse.team.svn.core.operation.local.CommitOperation$2.run(CommitOperation.java:124)
	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doSubTask(ProgressMonitorUtility.java:118)
	at org.eclipse.team.svn.core.operation.AbstractActionOperation.protectStep(AbstractActionOperation.java:154)
	at org.eclipse.team.svn.core.operation.AbstractActionOperation.protectStep(AbstractActionOperation.java:149)
	at org.eclipse.team.svn.core.operation.local.CommitOperation.performCommit(CommitOperation.java:122)
	at org.eclipse.team.svn.core.operation.local.CommitOperation.runImpl(CommitOperation.java:103)
	at org.eclipse.team.svn.core.operation.AbstractActionOperation.run(AbstractActionOperation.java:81)
	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTask(ProgressMonitorUtility.java:104)
	at org.eclipse.team.svn.core.operation.CompositeOperation.runImpl(CompositeOperation.java:95)
	at org.eclipse.team.svn.core.operation.AbstractActionOperation.run(AbstractActionOperation.java:81)
	at org.eclipse.team.svn.core.operation.LoggedOperation.run(LoggedOperation.java:39)
	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTask(ProgressMonitorUtility.java:104)
	at org.eclipse.team.svn.core.utility.ProgressMonitorUtility.doTaskExternal(ProgressMonitorUtility.java:90)
	at org.eclipse.team.svn.ui.utility.WorkspaceModifyCancellableOperationWrapper.execute(WorkspaceModifyCancellableOperationWrapper.java:58)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.team.svn.ui.utility.SVNTeamOperationWrapper.run(SVNTeamOperationWrapper.java:35)
	at org.eclipse.team.internal.ui.actions.JobRunnableContext.run(JobRunnableContext.java:144)
	at org.eclipse.team.internal.ui.actions.JobRunnableContext$ResourceJob.runInWorkspace(JobRunnableContext.java:72)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.tigris.subversion.javahl.ClientException: A repository hook failed
svn: Commit failed (details follow):
svn: Commit blocked by pre-commit hook (exit code 1) with output:
Your commit has been blocked because you didn't enter a comment. Empty commit 
messages are NOT allowed! Write a log message describing the changed you made 
and try again. 


	at org.tigris.subversion.javahl.SVNClient.commit(Native Method)
	at org.polarion.team.svn.connector.javahl.JavaHLConnector.commit(JavaHLConnector.java:336)
	... 23 more

Reproducible: Always

Steps to Reproduce:
1. Enable 'pre-commit' check for empty commit comments on server (see: the hooks directory of your repository on your server)
2. Select 'SVNKit' as SVN-Connector (go to: Window --> Preferences --> Team --> SVN --> SVN-Connector TAB) and Apply the change
3. Commit a changed file and leave the commit message empty
4. Normally a dialog should appear indicating that the commit failed (as it does with the Native JavaHL SVN Connector) but this doesn't show up.
Comment 1 Alexander Gurov CLA 2011-03-08 04:27:17 EST
Subset of bug #338641.

*** This bug has been marked as a duplicate of bug 338641 ***