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 feb3b33 Optionally return all repo entries
feb3b33 is described below
commit feb3b33e1364c82aaf16b865de5288eefd30f297
Author: Sebb <[email protected]>
AuthorDate: Wed Jul 8 12:44:08 2020 +0100
Optionally return all repo entries
---
Rakefile | 6 +++---
lib/whimsy/asf/svn.rb | 14 ++++++++++----
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/Rakefile b/Rakefile
index 8f4e85a..18a0d08 100644
--- a/Rakefile
+++ b/Rakefile
@@ -115,7 +115,7 @@ end
namespace :svn do
task :update => :config do
- # Include depth == 'delete'
+ # Include all
svnrepos = ASF::SVN.repo_entries(true) || {}
# must be outside loop
@@ -142,7 +142,8 @@ namespace :svn do
end
end
svnpath = ASF::SVN.svnurl(name)
- noCheckout = description['depth'] == 'delete'
+ depth = description['depth']
+ noCheckout = %w(delete skip).include? depth
if Dir.exist? name
if noCheckout
puts "#{PREFIX} Removing #{name} as it is not intended for
checkout"
@@ -162,7 +163,6 @@ namespace :svn do
isSymlink = File.symlink?(name) # we don't want to change such
checkouts
Dir.chdir(name) {
system('svn', 'cleanup')
- depth = description['depth']
files = description['files']
if depth == 'empty' and not isSymlink
curdepth = ASF::SVN.getInfoAsHash('.')['Depth'] # not
available as separate item
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index abb8935..6c17640 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -78,10 +78,16 @@ module ASF
end
# Get the SVN repo entries corresponding to local checkouts
- # Excludes those that are present as aliases only
- # @params includeDeleted if should return depth == delete, default false
- def self.repo_entries(includeDelete=false)
- self._all_repo_entries.reject{|k,v| v['depth'] == 'skip' or (v['depth']
== 'delete' and not includeDelete)}
+ # Excludes depth=delete and depth=skip
+ # Optionally return all entries
+ # @params
+ # includeAll if should return all entries, default false
+ def self.repo_entries(includeAll=false)
+ if includeAll
+ self._all_repo_entries
+ else
+ self._all_repo_entries.reject{|k,v| v['depth'] == 'skip' or v['depth']
== 'delete'}
+ end
end
# fetch a repository entry by name