@@ -36,23 +36,29 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 | system "svnadmin create #{repo_path}" | |
|
40 | system "gunzip < test/fixtures/repositories/subversion_repository.dump.gz | svnadmin load #{repo_path}" | |
|
39 | unless File.exists?(repo_path) | |
|
40 | system "svnadmin create #{repo_path}" | |
|
41 | system "gunzip < test/fixtures/repositories/subversion_repository.dump.gz | svnadmin load #{repo_path}" | |
|
42 | end | |
|
41 | 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" |
|
46 | bundle_path = "test/fixtures/repositories/mercurial_repository.hg" | |
|
47 | system "hg init #{repo_path}" | |
|
48 |
system "hg |
|
|
48 | unless File.exists?(repo_path) | |
|
49 | bundle_path = "test/fixtures/repositories/mercurial_repository.hg" | |
|
50 | system "hg init #{repo_path}" | |
|
51 | system "hg -R #{repo_path} pull #{bundle_path}" | |
|
52 | end | |
|
49 | 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 |
|
54 | # system "gunzip < test/fixtures/repositories/#{scm}_repository.tar.gz | tar -xv -C tmp/test" | |
|
55 |
system " |
|
|
58 | unless File.exists?("tmp/test/#{scm}_repository") | |
|
59 | # system "gunzip < test/fixtures/repositories/#{scm}_repository.tar.gz | tar -xv -C tmp/test" | |
|
60 | system "tar -xvz -C tmp/test -f test/fixtures/repositories/#{scm}_repository.tar.gz" | |
|
61 | end | |
|
56 | 62 | end |
|
57 | 63 | end |
|
58 | 64 |
General Comments 0
You need to be logged in to leave comments.
Login now