You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/11/29 15:25:17 UTC

[whimsy] 02/02: Use ASF::SVN methods

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

commit 63492d134f395cd645841928701b87b3c5803b18
Author: Sebb <se...@apache.org>
AuthorDate: Fri Nov 29 15:25:06 2019 +0000

    Use ASF::SVN methods
---
 Rakefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Rakefile b/Rakefile
index 72da78b..12e95db 100644
--- a/Rakefile
+++ b/Rakefile
@@ -95,8 +95,6 @@ namespace :svn do
     if svn.instance_of? String and svn.end_with? '/*'
       mkdir_p File.dirname(svn) unless Dir.exists? File.dirname(svn)
       Dir.chdir File.dirname(svn) do
-        require 'uri'
-        base = URI.parse('https://svn.apache.org/repos/')
         svnrepos.each do |name, description|
           puts
           puts File.join(Dir.pwd, name)
@@ -114,13 +112,15 @@ namespace :svn do
               puts "#{PREFIX} List updated: #{old} => SVN: #{new}"
             end
           end
-          svnpath = (base + description['url']).to_s
+          svnpath = ASF::SVN.svnurl(name)
           if Dir.exist? name
-            if `svn info #{name}`[/^URL: (.*)/, 1] != svnpath
+            curpath = ASF::SVN.getInfoItem(name,'url')
+            if curpath != svnpath
+              puts "Removing #{name} to correct URL: #{curpath} => #{svnpath}"
               FileUtils.rm_rf name  
             end
           end
-    
+
           if Dir.exist? name
             Dir.chdir(name) {
               system 'svn cleanup'
@@ -160,7 +160,7 @@ namespace :svn do
           else
             system 'svn', 'checkout', 
               "--depth=#{description['depth'] || 'infinity'}",
-              (base + description['url']).to_s, name
+              svnpath, name
           end
         end
       end