summaryrefslogtreecommitdiffstats
path: root/lib/tasks
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-10 17:43:01 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-10 17:43:01 +0000
commit2cbf60851fe95e57264c1abfb778bde1f05fa6e7 (patch)
treebdcce53e77583e9effc7f8e2bb937ad4a4e24d5d /lib/tasks
parenta9eea27742ddf4b7ba8930d292ec2564417a72d1 (diff)
downloadredmine-2cbf60851fe95e57264c1abfb778bde1f05fa6e7.tar.gz
redmine-2cbf60851fe95e57264c1abfb778bde1f05fa6e7.zip
Store the mercurial test repository as a bundle to make it compatible with older hg versions.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4676 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/testing.rake13
1 files changed, 12 insertions, 1 deletions
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"