From: Toshi MARUYAMA Date: Tue, 11 Jan 2011 04:22:31 +0000 (+0000) Subject: Merged r4676 from trunk (change mercurial test repository from tar.gz to bundle). X-Git-Tag: 1.1.1~33 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6734f91a72129a1b96fb148dbcc59a7d9f88c7e7;p=redmine.git Merged r4676 from trunk (change mercurial test repository from tar.gz to bundle). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@4684 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/tasks/testing.rake b/lib/tasks/testing.rake index 45066ae30..0fd6a19b0 100644 --- a/lib/tasks/testing.rake +++ b/lib/tasks/testing.rake @@ -40,7 +40,18 @@ namespace :test do system "gunzip < test/fixtures/repositories/subversion_repository.dump.gz | svnadmin load #{repo_path}" end - (supported_scms - [:subversion]).each do |scm| + desc "Creates a test mercurial repository" + task :mercurial => :create_dir do + repo_path = "tmp/test/mercurial_repository" + FileUtils.mkdir_p repo_path + Dir.chdir repo_path do + system "hg init" + system "hg unbundle ../../../test/fixtures/repositories/mercurial_repository.hg" + system "hg update" + end + end + + (supported_scms - [:subversion, :mercurial]).each do |scm| desc "Creates a test #{scm} repository" task scm => :create_dir do system "gunzip < test/fixtures/repositories/#{scm}_repository.tar.gz | tar -xv -C tmp/test" diff --git a/test/fixtures/repositories/mercurial_repository.hg b/test/fixtures/repositories/mercurial_repository.hg new file mode 100644 index 000000000..c06844d23 Binary files /dev/null and b/test/fixtures/repositories/mercurial_repository.hg differ diff --git a/test/fixtures/repositories/mercurial_repository.tar.gz b/test/fixtures/repositories/mercurial_repository.tar.gz deleted file mode 100644 index c0b9f4373..000000000 Binary files a/test/fixtures/repositories/mercurial_repository.tar.gz and /dev/null differ