Integration with Subversion on Windows
Hi, just getting into Lighthouse and am was quite excited to start off with integrating our Subversion. However, I'm on windows and don't have Ruby installed. What's your suggestion for the post-commit script in that case?
Thanks.
Evan
Discussions are closed to public comments.
If you need help with Lighthouse please
start a new discussion.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
1 Posted by Rick on 26 Jun, 2009 11:53 PM
You just need something that can make HTTP calls and post xml or json. What do you have? Ruby's a good choice and quick install away :)
Keep in mind, these post-commit hooks go on your subversion server.
2 Posted by Evan McDaniel on 29 Jun, 2009 05:32 PM
Hi, thanks for the reply. I've installed ruby and am working through issues in the post-commit script related to win vs linux.
I seem to be stuck at line 27, the error I get is "unexpected kEND, expecting $end'. I don't really know ruby at all so not sure what to change.
Does anyone out there know how ruby differs on win enough to know what I should do?
Thanks.
3 Posted by Rick on 29 Jun, 2009 05:44 PM
Can you post the ruby script that you have at gist.github.com? That error is a simple ruby parsing error. Be sure to sanitize any passwords or other sensitive data you might have. I just double checked the syntax in the example script and it's good, so it might just be a slight error in translation.
4 Posted by Evan McDaniel on 29 Jun, 2009 06:07 PM
Thanks, here's the gist...
git clone git://gist.github.com/137727.git gist-137727
5 Posted by Rick on 29 Jun, 2009 10:55 PM
Line 8 should look like this:
SVNLOOK = 'E:\Subversion\bin\svnlook.exe'
You used a tilde instead of a single quote there. It's probably a bit
confusing if you're new to ruby/perl, but tildes mark shell commands.
For instance:
commit_author = `#{SVNLOOK} author #{repo_path} -r #{revision}`.chop
That runs the command "E:\Subversion\bin\svnlook.exe author
/path/to/repo -r 21356" and uses the output of it to set the
commit_author variable.
6 Posted by Evan McDaniel on 02 Jul, 2009 09:46 PM
Hi RIck, Thanks for hanging in there with me on this.
So, made some progress to the point where, when I test from the command line, the hook succeeds. But when I look in the log, I see this error:
"Error: undefined method 'strip' for nil:NilClass trace:"
Thanks for any help you can offer. I guess after this at least we'll have a Windows version of the post-commit script to share :)
7 Posted by Rick on 02 Jul, 2009 10:05 PM
Can you show the rest of the log? It'll tell where the error came from.