java - How to write a SVN pre-commit hook script in Windows(Server-side) -
each change made , committed svn developer on team delivers requirement of app , requirement has id written in first line of commit message.
i need hook catch id , call external service verify if id status ok. have read lot svn structure , hooks don´t understand how write hook in java.
a hook is executable program placed in specific place accepts specific arguments. language in doesn't matter.
in case if you're trying write in java , run on windows need write .bat file , install under hooks directory proper name. you'll need pass through arguments batch file receives java program.
the reason you'll need batch file here because windows can't start java program , need run java proper arguments.
something should work: @echo off java -jar myjavahook.jar %*
the %* copies arguments batch file , adds them java program.
you may need different or additional arguments depending on java program.
since you're writing pre-commit hook , exit code of batch file important you'll want described in other question: can batch file capture exit codes of commands invoking?
Comments
Post a Comment