5 Replies Latest reply on Apr 24, 2008 3:59 PM by John McGinnis-Oracle

    EA3: Subversion pre-commit hook trigger trouble

    Sentinel
      SQL Developer 1.5.0.53 with Java 1.6.0_06

      Running on Windows XP Professional Version 2002 Service Pack 2

      Using Subversion with a local file repository with the following pre-commit.bat batch file in the repositories hooks directory:
      echo %* >> C:\COS-SVN-Repository\hooks\pre-commit.log
      svnlook log -t %2 %1 | grep [[:print:]] ||(echo Log Entry Required >&2 & exit 1)
      exit 1
      When committing a change to the repository the second line in this pre-commit hook should prevent commits without comments from being committed. The final line just ensures that the hook fails for testing purposes.

      However, neither the first line which should log the hook calls parameters, nor the second line wich should test for the presence of a comment work from SQL Developer, and without the final exit statement all commits succeed even when they should fail. This hook script works perfectly from command line svn and TortoiseSVN

      When this hook fails it yeilds the following Exception Stack Trace in SQL Developer:
      org.tigris.subversion.svnclientadapter.SVNClientException: org.tigris.subversion.javahl.ClientException: svn: Commit failed (details follow):
      svn: 'pre-commit' hook failed with error output:
      Repository argument required
      Type 'svnlook help' for usage.

           at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.commit(AbstractJhlClientAdapter.java:274)
           at oracle.jdevimpl.vcs.svn.op.SVNOperationCommit.invokeCommit(SVNOperationCommit.java:206)
           at oracle.jdevimpl.vcs.svn.op.SVNOperationCommit.invokeCommandImpl(SVNOperationCommit.java:72)
           at oracle.jdevimpl.vcs.svn.op.AbstractSVNOperation.mav$invokeCommandImpl(AbstractSVNOperation.java:46)
           at oracle.jdevimpl.vcs.svn.op.AbstractSVNOperation$1.doCommitOperation(AbstractSVNOperation.java:105)
           at oracle.jdeveloper.vcs.spi.VCSDialogCommitter$1.run(VCSDialogCommitter.java:82)
      Caused by: org.tigris.subversion.javahl.ClientException: svn: Commit failed (details follow):
      svn: 'pre-commit' hook failed with error output:
      Repository argument required
      Type 'svnlook help' for usage.

           at org.tigris.subversion.javahl.JavaHLObjectFactory.throwException(JavaHLObjectFactory.java:435)
           at org.tmatesoft.svn.core.javahl.SVNClientImpl.throwException(SVNClientImpl.java:1311)
           at org.tmatesoft.svn.core.javahl.SVNClientImpl.commit(SVNClientImpl.java:498)
           at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.commit(AbstractJhlClientAdapter.java:268)
           ... 5 more
      Caused by: org.tmatesoft.svn.core.SVNException: svn: Commit failed (details follow):
      svn: 'pre-commit' hook failed with error output:
      Repository argument required
      Type 'svnlook help' for usage.

           at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:55)
           at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:40)
           at org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:582)
           at org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:549)
           at org.tmatesoft.svn.core.javahl.SVNClientImpl.commit(SVNClientImpl.java:496)
           ... 6 more
      Note that the error output:
      Repository argument required
      Type 'svnlook help' for usage.
      Displayed in the stack trace is the error text generated by the svnlook log command when no additional arguments are passed to it.

      This leads me to believe that SQL Developer is not properly passing parameters to at least the pre-commit hook trigger.

      Message was edited by:
      Sentinel