Permalink
Browse files

Svnlook path is now determined at runtime automatically using which

  • Loading branch information...
1 parent f401c48 commit 24d490aed7000a1fbd82f239019ae0147b5f9e74 @jqr jqr committed Aug 29, 2008
Showing with 5 additions and 5 deletions.
  1. +1 −1 lib/snitch.rb
  2. +3 −3 lib/snitch/revisions/subversion.rb
  3. +1 −1 test/unit/revisions/subversion.rb
View
@@ -27,7 +27,7 @@ def initialize(repository, revision, options)
when :git
Revisions::Git.new(repository, revision)
when :subversion
- Revisions::Subversion.new(repository, revision, @config[:svnlook])
+ Revisions::Subversion.new(repository, revision)
else
raise "Unrecognized scm: #{options[:scm].inspect}"
end
@@ -6,9 +6,9 @@ class Subversion
attr_reader :repository, :revision
- def initialize(repository, revision, svn_look_path=nil)
- @repository, @revision, @svnlook = repository, revision, svn_look_path
- @svnlook = svn_look_path || '/usr/bin/svnlook'
+ def initialize(repository, revision)
+ @repository, @revision, @svnlook = repository, revision
+ @svnlook = `which svnlook`
end
# Creates a few helper methods for looking at the subversion commit
@@ -6,7 +6,7 @@ class SubersionTest < Test::Unit::TestCase
def setup
# Creates a test subversion repo locally and makes a test commit to it
repo, checkout = create_subversion_repository_and_checkout
- @revision = Snitch::Revisions::Subversion.new(repo, 1, '/usr/local/bin/svnlook')
+ @revision = Snitch::Revisions::Subversion.new(repo, 1)
end
test 'should be able to load repository' do

0 comments on commit 24d490a

Please sign in to comment.