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 2020/07/17 13:48:28 UTC

[whimsy] branch master updated: Allow update of a single 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


The following commit(s) were added to refs/heads/master by this push:
     new 4697865  Allow update of a single checkout
4697865 is described below

commit 4697865bbf2a1e2c812de3927c1c6036e0797109
Author: Sebb <se...@apache.org>
AuthorDate: Fri Jul 17 14:48:18 2020 +0100

    Allow update of a single checkout
    
    This is for later use with pubsub
---
 Rakefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Rakefile b/Rakefile
index 9363030..0a27eb3 100644
--- a/Rakefile
+++ b/Rakefile
@@ -114,7 +114,8 @@ task :config do
 end
 
 namespace :svn do
-  task :update, [:listonly] => :config do |task, args|
+  task :update, [:arg1] => :config do |task, args|
+    arg1 = args.arg1 || '' # If defined, it is either the name of a checkout to update or 'skip'
     # Include all
     svnrepos = ASF::SVN.repo_entries(true) || {}
 
@@ -130,6 +131,9 @@ namespace :svn do
         svnrepos.each do |name, description|
           puts
           puts File.join(Dir.pwd, name)
+          # skip the update unless it matches the parameter provided
+          # 'skip' is special and means update all list files
+          next unless name == arg1 || arg1 == 'skip' || arg1 == ''
           if description['list']
             puts "#{PREFIX} Updating listing file"
             old,new = ASF::SVN.updatelisting(name,nil,nil,description['dates'])
@@ -157,7 +161,7 @@ namespace :svn do
             end
           end
 
-          next if args.listonly == 'skip'
+          next if arg1 == 'skip'
           if noCheckout
             puts "Skipping" if depth == 'skip' # Must agree with monitors/svn.rb
             next