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/08 15:48:59 UTC

[whimsy] branch master updated: Add check for file presence

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 fea7fe0  Add check for file presence
fea7fe0 is described below

commit fea7fe0d73ade6906436f6f7470970dd3a2ecf68
Author: Sebb <se...@apache.org>
AuthorDate: Wed Jul 8 16:48:49 2020 +0100

    Add check for file presence
---
 Rakefile | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/Rakefile b/Rakefile
index 18a0d08..bc22023 100644
--- a/Rakefile
+++ b/Rakefile
@@ -159,11 +159,11 @@ namespace :svn do
 
           next if noCheckout
 
+          files = description['files']
           if Dir.exist? name
             isSymlink = File.symlink?(name) # we don't want to change such checkouts
             Dir.chdir(name) {
               system('svn', 'cleanup')
-              files = description['files']
               if depth == 'empty' and not isSymlink
                 curdepth = ASF::SVN.getInfoAsHash('.')['Depth'] # not available as separate item
                 if curdepth != depth
@@ -212,14 +212,20 @@ namespace :svn do
 
               puts outerr # show what happened last
             }
-          else
+          else # directory does not exist
             depth = description['depth'] || 'infinity'
             system('svn', 'checkout', "--depth=#{depth}", svnpath, name)
-             files = description['files']
              if files
                system('svn', 'update', *files, {chdir: name})
               end
           end
+          # check that explicitly required files exist
+          if files
+            files.each do |file|
+              path = File.join(name, file)
+              puts "Missing: #{path}" unless File.exist? path
+            end
+          end
         end
       end
     end