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

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -