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 2020/07/08 23:24:59 UTC
[whimsy] branch master updated: Allow override of svn @base;
allow svn: URLs
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
The following commit(s) were added to refs/heads/master by this push:
new 956b71d Allow override of svn @base; allow svn: URLs
956b71d is described below
commit 956b71d473fac69a0da3771f869a4165d81b2b28
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jul 9 00:24:50 2020 +0100
Allow override of svn @base; allow svn: URLs
Makes local testing easier
---
lib/whimsy/asf/svn.rb | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index 13e2211..adf2871 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -14,7 +14,14 @@ module ASF
#
class SVN
- @base = URI.parse('https://svn.apache.org/repos/')
+ svn_base = ASF::Config.get(:svn_base)
+ if svn_base
+ require 'wunderbar'
+ Wunderbar.warn("Found override for svn_base: #{svn_base}")
+ else
+ svn_base = 'https://svn.apache.org/repos/'
+ end
+ @base = URI.parse(svn_base)
@mock = 'file:///var/tools/svnrep/'
@semaphore = Mutex.new
@testdata = {}
@@ -799,8 +806,8 @@ module ASF
parenturl = ASF::SVN.getInfoItem(parentdir,'url')
else
uri = URI.parse(path)
- # allow file: URIs for local testing
- if %w(http https file).include? uri.scheme
+ # allow file: and svn URIs for local testing
+ if %w(http https file svn).include? uri.scheme
basename = File.basename(uri.path).untaint
parentdir = File.dirname(uri.path).untaint
uri.path = parentdir