whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Add dryrun to multiUpdate
Date Sat, 06 Jun 2020 14:18:28 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


The following commit(s) were added to refs/heads/master by this push:
     new de90463  Add dryrun to multiUpdate
de90463 is described below

commit de904636aedc54e7707d8e2b1858a6930058d737
Author: Sebb <sebb@apache.org>
AuthorDate: Sat Jun 6 15:18:19 2020 +0100

    Add dryrun to multiUpdate
---
 lib/whimsy/asf/svn.rb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index 6f1d722..9af5dbb 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -578,7 +578,7 @@ module ASF
     #     extra << ['rm',url3]
     #     [out, extra]
     #   end
-    def self.multiUpdate(path, msg, env, _)
+    def self.multiUpdate(path, msg, env, _, options = {})
       require 'tempfile'
       tmpdir = Dir.mktmpdir.untaint
       if File.file? path
@@ -638,7 +638,11 @@ module ASF
         end
         
         # Now commit everything
-        ASF::SVN.svnmucc(cmds,msg,env,_,filerev,tmpdir)
+        if options[:dryrun]
+          puts cmds # TODO: not sure this is correct for Wunderbar
+        else
+          ASF::SVN.svnmucc(cmds,msg,env,_,filerev,tmpdir)
+        end
       ensure
         FileUtils.rm_rf tmpdir
       end


Mime
View raw message