whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] 01/02: Use the listing instead of the checkout
Date Fri, 29 Nov 2019 15:25:16 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

commit 20fc80b7ed93d469fef8a5ba872435ccfb513644
Author: Sebb <sebb@apache.org>
AuthorDate: Fri Nov 29 13:41:09 2019 +0000

    Use the listing instead of the checkout
---
 lib/whimsy/asf/ccla.rb | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/whimsy/asf/ccla.rb b/lib/whimsy/asf/ccla.rb
index 2a07414..936f9ff 100644
--- a/lib/whimsy/asf/ccla.rb
+++ b/lib/whimsy/asf/ccla.rb
@@ -4,20 +4,19 @@ module ASF
 
   # Common class for access to documents/cclas/ directory
   class CCLAFiles
-    @@CCLAFILES = nil # cache the find if actually needed
 
     # listing of top-level icla file/directory names
     # Directories are listed without trailing "/"
     def self.listnames
-      @@CCLAFILES = ASF::SVN['cclas'] unless @@CCLAFILES
-      Dir[File.join(@@CCLAFILES, '*')]
+      _, list = ASF::SVN.getlisting('cclas') # do we need to cache the listing?
+      list
     end
 
     # Does an entry exist?
     def self.exist?(name)
-      @@CCLAFILES = ASF::SVN['cclas'] unless @@CCLAFILES
-      Dir[File.join(@@CCLAFILES, name)].any?
+      self.listnames.include?(name)
     end
+    
   end
 
 end


Mime
View raw message