whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Simplify
Date Fri, 05 Jun 2020 17:08:42 GMT
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 9ca6c16  Simplify
9ca6c16 is described below

commit 9ca6c16d485da0338f6286fa35835d890da0b93b
Author: Sebb <sebb@apache.org>
AuthorDate: Fri Jun 5 18:08:31 2020 +0100

    Simplify
---
 lib/whimsy/asf/committee.rb       | 3 +--
 lib/whimsy/asf/icla.rb            | 3 +--
 lib/whimsy/asf/svn.rb             | 2 +-
 www/board/agenda/models/agenda.rb | 2 +-
 www/members/inactive.cgi          | 2 +-
 www/members/proxy.cgi             | 2 +-
 6 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index a50f27a..00c2853 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -117,8 +117,7 @@ module ASF
         end
 
         @committee_mtime = File.mtime(file)
-        @@svn_change = Time.parse(
-          `svn info #{file}`[/Last Changed Date: (.*) \(/, 1]).gmtime
+        @@svn_change = Time.parse(ASF::SVN.getInfoItem(file,'last-changed-date')).gmtime
 
         parse_committee_info File.read(file)
       end
diff --git a/lib/whimsy/asf/icla.rb b/lib/whimsy/asf/icla.rb
index 56698ec..7142c2c 100644
--- a/lib/whimsy/asf/icla.rb
+++ b/lib/whimsy/asf/icla.rb
@@ -55,8 +55,7 @@ module ASF
     def self.svn_change
       self.refresh
       if SOURCE
-        @@svn_change ||= Time.parse(
-          `svn info #{SOURCE}`[/Last Changed Date: (.*) \(/, 1]).gmtime
+        @@svn_change ||= Time.parse(ASF::SVN.getInfoItem(SOURCE,'last-changed-date')).gmtime
       end
     end
 
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index d88d36e..6f1d722 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -443,7 +443,7 @@ module ASF
         # create an empty checkout
         _.system ['svn', 'checkout', '--depth', 'empty', '--non-interactive',
           ['--username', env.user, '--password', env.password],
-          `svn info #{dir}`[/URL: (.*)/, 1], tmpdir]
+          self.getInfoItem(dir,'url'), tmpdir]
 
         # retrieve the file to be updated (may not exist)
         if basename
diff --git a/www/board/agenda/models/agenda.rb b/www/board/agenda/models/agenda.rb
index b3ddce8..cdb3d4b 100755
--- a/www/board/agenda/models/agenda.rb
+++ b/www/board/agenda/models/agenda.rb
@@ -157,7 +157,7 @@ class Agenda
       baseline = File.read(path) if Agenda[file][:mtime] == File.mtime(path)
 
       # check out empty directory
-      board = `svn info #{FOUNDATION_BOARD}`[/URL: (.*)/, 1]
+      board = ASF::SVN.getInfoItem(FOUNDATION_BOARD,'url')
       _.system ['svn', 'checkout', auth, '--depth', 'empty', board, dir]
 
       # update the file in question
diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index cc000a9..9dd7f1e 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -113,7 +113,7 @@ _html do
           # apply and commit changes
           Dir.mktmpdir do |dir|
             _div_.transcript do
-              work = `svn info #{latest}`[/URL: (.*)/, 1]
+              work = ASF::SVN.getInfoItem(latest,'url')
               _.system ['svn', 'checkout', auth, '--depth', 'empty', work, dir]
               json = File.join(dir, 'non-participants.json')
               _.system ['svn', 'update', auth, json]
diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi
index 3eec727..c397255 100755
--- a/www/members/proxy.cgi
+++ b/www/members/proxy.cgi
@@ -179,7 +179,7 @@ def emit_post(cur_mtg_dir, meeting)
   # report on commit
   _div.transcript do
     Dir.mktmpdir do |tmpdir|
-      svn = `svn info #{MEETINGS}/#{meeting}`[/URL: (.*)/, 1]
+      svn =  ASF::SVN.getInfoItem(File.join(MEETINGS,meeting),'url')
 
       _.system [
         'svn', 'checkout', '--quiet', svn.untaint, tmpdir.untaint,


Mime
View raw message