]> source.dussan.org Git - redmine.git/commitdiff
Merged r4676 from trunk (change mercurial test repository from tar.gz to bundle).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 11 Jan 2011 04:22:31 +0000 (04:22 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 11 Jan 2011 04:22:31 +0000 (04:22 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@4684 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/tasks/testing.rake
test/fixtures/repositories/mercurial_repository.hg [new file with mode: 0644]
test/fixtures/repositories/mercurial_repository.tar.gz [deleted file]

index 45066ae3045a8db85b2f7c588614a718a6514f04..0fd6a19b0a161c52fea6aec0b23b37f84358a363 100644 (file)
@@ -40,7 +40,18 @@ namespace :test do
         system "gunzip < test/fixtures/repositories/subversion_repository.dump.gz | svnadmin load #{repo_path}"\r
       end\r
       \r
-      (supported_scms - [:subversion]).each do |scm|\r
+      desc "Creates a test mercurial repository"\r
+      task :mercurial => :create_dir do\r
+        repo_path = "tmp/test/mercurial_repository"\r
+        FileUtils.mkdir_p repo_path\r
+        Dir.chdir repo_path do\r
+          system "hg init"\r
+          system "hg unbundle ../../../test/fixtures/repositories/mercurial_repository.hg"\r
+          system "hg update"\r
+        end\r
+      end\r
+      \r
+      (supported_scms - [:subversion, :mercurial]).each do |scm|\r
         desc "Creates a test #{scm} repository"\r
         task scm => :create_dir do\r
           system "gunzip < test/fixtures/repositories/#{scm}_repository.tar.gz | tar -xv -C tmp/test"\r
diff --git a/test/fixtures/repositories/mercurial_repository.hg b/test/fixtures/repositories/mercurial_repository.hg
new file mode 100644 (file)
index 0000000..c06844d
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 (file)
index c0b9f43..0000000
Binary files a/test/fixtures/repositories/mercurial_repository.tar.gz and /dev/null differ