##// END OF EJS Templates
Prevent test:scm:setup:* task to overwrite if the test repository already exists....
Jean-Philippe Lang -
r8929:55bbfa19b6ed
parent child
Show More
@@ -36,25 +36,31 namespace :test do
36 36 desc "Creates a test subversion repository"
37 37 task :subversion => :create_dir do
38 38 repo_path = "tmp/test/subversion_repository"
39 unless File.exists?(repo_path)
39 40 system "svnadmin create #{repo_path}"
40 41 system "gunzip < test/fixtures/repositories/subversion_repository.dump.gz | svnadmin load #{repo_path}"
41 42 end
43 end
42 44
43 45 desc "Creates a test mercurial repository"
44 46 task :mercurial => :create_dir do
45 47 repo_path = "tmp/test/mercurial_repository"
48 unless File.exists?(repo_path)
46 49 bundle_path = "test/fixtures/repositories/mercurial_repository.hg"
47 50 system "hg init #{repo_path}"
48 51 system "hg -R #{repo_path} pull #{bundle_path}"
49 52 end
53 end
50 54
51 55 (supported_scms - [:subversion, :mercurial]).each do |scm|
52 56 desc "Creates a test #{scm} repository"
53 57 task scm => :create_dir do
58 unless File.exists?("tmp/test/#{scm}_repository")
54 59 # system "gunzip < test/fixtures/repositories/#{scm}_repository.tar.gz | tar -xv -C tmp/test"
55 60 system "tar -xvz -C tmp/test -f test/fixtures/repositories/#{scm}_repository.tar.gz"
56 61 end
57 62 end
63 end
58 64
59 65 desc "Creates all test repositories"
60 66 task :all => supported_scms
General Comments 0
You need to be logged in to leave comments. Login now