Added basic support for CVS and Mercurial SCMs.

Browsing, changesets fetching and diff viewing are implemented.
Only tested with local repositories.

Thanks to Ralph Vater for CVS specific code.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@559 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-06-12 20:12:05 +00:00
parent 4dddb606a6
commit 438161ad1f
41 changed files with 1569 additions and 605 deletions
+1 -15
View File
@@ -25,7 +25,7 @@ class RepositoryTest < Test::Unit::TestCase
end
def test_create
repository = Repository.new(:project => Project.find(2))
repository = Repository::Subversion.new(:project => Project.find(2))
assert !repository.save
repository.url = "svn://localhost"
@@ -34,12 +34,6 @@ class RepositoryTest < Test::Unit::TestCase
project = Project.find(2)
assert_equal repository, project.repository
end
def test_cant_change_url
url = @repository.url
@repository.url = "svn://anotherhost"
assert_equal url, @repository.url
end
def test_scan_changesets_for_issue_ids
@@ -59,12 +53,4 @@ class RepositoryTest < Test::Unit::TestCase
# ignoring commits referencing an issue of another project
assert_equal [], Issue.find(4).changesets
end
def test_changesets_with_path
@repository.changesets_with_path '/some/path' do
assert_equal 1, @repository.changesets.count(:select => "DISTINCT #{Changeset.table_name}.id")
changesets = @repository.changesets.find(:all)
assert_equal 1, changesets.size
end
end
end