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/29 15:25:16 UTC
[whimsy] 01/02: Use the listing instead of the checkout
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 <se...@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