????post-commit-hook-hudson.vbs

repos   = WScript.Arguments.Item(0)
rev     = WScript.Arguments.Item(1)
svnlook = WScript.Arguments.Item(2)
hudson  = WScript.Arguments.Item(3)

Set shell = WScript.CreateObject("WScript.Shell")

Set uuidExec = shell.Exec(svnlook & " uuid " & repos)
Do Until uuidExec.StdOut.AtEndOfStream
  uuid = uuidExec.StdOut.ReadLine()
Loop
Wscript.Echo "uuid=" & uuid

Set changedExec = shell.Exec(svnlook & " changed --revision " & rev & " " & repos)
Do Until changedExec.StdOut.AtEndOfStream
  changed = changed + changedExec.StdOut.ReadLine() + Chr(10)
Loop
Wscript.Echo "changed=" & changed

change=CStr(changed)
a=InStr(change??"trunk/code/")

url = "http://127.0.0.1/hudson/job/code%E6%9E%84%E5%BB%BA%E5%92%8C%E5%8D%95%E5%85%83%E6%B5%8B%E8%AF%95/build?token=testanddevelop"
Wscript.Echo url

if a>0 then
Set http = CreateObject("Microsoft.XMLHTTP")
http.open "POST"?? url?? False
http.setRequestHeader "Content-Type"??"text/plain;charset=UTF-8"
http.send changed
set http = nothing
end if
set repos = nothing
set rev =nothing
set svnlook = nothing
set hudson = nothing
set shell = nothing
set uuidExec = nothing
set changeExec = nothing
set change = nothing
set a = nothing
set url = nothing

?????????????????????????????????£? ????????????????? ??????? ??. Alpha???? Alpha?????????????????????????????????????Alpha?????????????????Alpha?????????е???Щ????????????????????? ?????????????Jar??????????????????????????κ????????????????????????????????????????????????????????????ò????????????????? ????????Alpha?????????????????????????e???????????????????Alpha???????????????????????????????????Щ?????????????????????????????????????Alpha?????????????????????????????????????Update???????Alpha Web?????????????ι??????????????????????Tomcat?μ???????κ????????????????????????????μ???????顣 ??. e????? e?????????????????????Alpha?????????????????????????????????????е???????????????????????????????????????Σ??????????e?????? ??????e?????? ????????????e?????????????????????????????????д???????????????????o???????????ò?????????????????????Щ?????????????????????????????????????????????????????????????????????????????????????????????????????????BUG????????????????????????????????????????????????????????????????????????????????????ü???????????????????????Щ???????????????????????e????????????????????e???????????????????????????????????????????????????