post-commit
Added by SwedishMatch TimerWolf almost 15 years ago
Hay i have try to get this code to work but of some reason i can´t get it to work and i don´t get why.
Its orginal posted in: http://www.redmine.org/boards/2/topics/449?r=4620#message-4620
/Slaktarn
pre-commit.bat
SET DIR=%1/hooks
SET REPOS="%1"
SET TXN="%2"
"C:\Program Files (x86)\Apache Software Foundation\Apache2.2\ruby\bin\ruby.exe" %DIR%\pre-commit.rb %REPOS% %TXN% %DIR%
pre-commit.rb
#!/usr/local/bin/ruby
repo_path = ARGV[0]
transaction = ARGV[1]
svnlook = 'C:\Program Files (x86)\Apache Software Foundation\Apache2.2\subversion\bin\svnlook.exe'
commit_log = `#{svnlook} log #{repo_path} -t #{transaction}`
if (commit_log == nil || commit_log.length < 2)
STDERR.puts("Log message cannot be empty.")
exit(1)
end
Replies (2)
RE: post-commit
-
Added by SwedishMatch TimerWolf almost 15 years ago
I can also say i use eclipse to update my code but i guss that shuld not matter what software you use to get it to work
/ Slaktarn
RE: post-commit
-
Added by Felix Schäfer almost 15 years ago
This looks right, but my windows knowledge is limited at best. You might have better luck asking on a subversion forum though.