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/25 20:10:04 UTC
[whimsy] branch master updated: Use central source for svn listing
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 45a737f Use central source for svn listing
45a737f is described below
commit 45a737f9f2d16232f434303ef18c8e8bdc3dd95e
Author: Sebb <se...@apache.org>
AuthorDate: Mon Nov 25 20:09:11 2019 +0000
Use central source for svn listing
---
www/status/svn.cgi | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/www/status/svn.cgi b/www/status/svn.cgi
index 8cc1bc9..5482361 100755
--- a/www/status/svn.cgi
+++ b/www/status/svn.cgi
@@ -6,13 +6,11 @@ $LOAD_PATH.unshift '/srv/whimsy/lib'
# SVN Repository status
#
-require 'yaml'
require 'wunderbar/bootstrap'
require 'whimsy/asf'
# load list of repositories
-repository_file = File.expand_path('../../../repository.yml', __FILE__)
-repository = YAML.load_file(repository_file)
+repository = ASF::SVN.repo_entries
svnrepos = Array(ASF::Config.get(:svn))
@@ -44,7 +42,7 @@ _html do
end
_tbody do
- repository[:svn].values.sort_by {|value| value['url']}.each do |svn|
+ repository.values.sort_by {|value| value['url']}.each do |svn|
local = ASF::SVN.find(svn['url']) unless svn['url'] =~ /^https?:/
color = nil
@@ -167,7 +165,7 @@ _json do
else
if @action == 'checkout'
- repo = repository[:svn].find {|name, value| value['url'] == @name}
+ repo = repository.find {|name, value| value['url'] == @name}
local_path = svnrepos.first.chomp('*') + repo.first
repository_url = @name