]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: test:scm:setup:mercurial task can be simpler (#7272).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 11 Jan 2011 04:18:08 +0000 (04:18 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 11 Jan 2011 04:18:08 +0000 (04:18 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4683 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/tasks/testing.rake

index 0fd6a19b0a161c52fea6aec0b23b37f84358a363..546284767b952d3601fb34bb0b96d732377805ad 100644 (file)
@@ -43,12 +43,8 @@ namespace :test do
       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
+        bundle_path = "test/fixtures/repositories/mercurial_repository.hg"\r
+        system "hg clone -U #{bundle_path} #{repo_path}"\r
       end\r
       \r
       (supported_scms - [:subversion, :mercurial]).each do |scm|\r