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 130ce31 Allow for independent override of svn directory
130ce31 is described below
commit 130ce312010b83148e06801abdd8b64e6e6d08de
Author: Sebb <[email protected]>
AuthorDate: Fri Jul 10 13:00:21 2020 +0100
Allow for independent override of svn directory
---
lib/spec/lib/icla_spec.rb | 2 +-
lib/spec/spec_helper.rb | 4 ++--
lib/whimsy/asf/svn.rb | 10 +++++-----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/spec/lib/icla_spec.rb b/lib/spec/lib/icla_spec.rb
index 6ef2c38..4543e9d 100644
--- a/lib/spec/lib/icla_spec.rb
+++ b/lib/spec/lib/icla_spec.rb
@@ -4,7 +4,7 @@
require 'spec_helper'
require 'whimsy/asf'
-set_root # need access to listing file
+set_svnroot # need access to listing file
# Test data:
# ab/ abc.pdf abcd/ abcde/
diff --git a/lib/spec/spec_helper.rb b/lib/spec/spec_helper.rb
index e6930b8..12535c7 100644
--- a/lib/spec/spec_helper.rb
+++ b/lib/spec/spec_helper.rb
@@ -17,8 +17,8 @@ else
TEST_DATA = false
end
-def set_root
- ASF::Config.setroot File.expand_path("../test", __dir__)
+def set_svnroot # ensure can access svn directory listing files
+ ASF::Config.setsvnroot File.expand_path("../test/svn/*", __dir__)
end
def set_svn(name)
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index 8052f39..332b520 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -954,12 +954,12 @@ module ASF
# Calculate svn parent directory allowing for overrides
def self.svn_parent
- # svn = ASF::Config.get(:svn)
- # if svn.instance_of? String and svn.end_with? '/*'
- # File.dirname(svn)
- # else
+ svn = ASF::Config.get(:svn)
+ if svn.instance_of? String and svn.end_with? '/*'
+ File.dirname(svn)
+ else
File.join(ASF::Config.root,'svn')
- # end
+ end
end
# get listing names for updating and returning SVN directory listings