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: Handle svnmucc --password-from-stdin
Date Tue, 16 Jun 2020 22:45:41 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 5648ed3  Handle svnmucc --password-from-stdin
5648ed3 is described below

commit 5648ed32ae2201371c205819266801af46287e7d
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Jun 16 23:45:33 2020 +0100

    Handle svnmucc --password-from-stdin
---
 lib/whimsy/asf/svn.rb | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index ba130b8..8f49bd6 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -661,9 +661,19 @@ module ASF
           syscmd << revision 
         end
         if env
-          syscmd << ['--username', env.user, '--password', env.password] # TODO --password-from-stdin
+          if self.passwordStdinOK?()
+            syscmd << ['--username', env.user, '--password-from-stdin']
+            sysopts[:stdin] = password
+          else
+            syscmd << ['--username', env.user, '--password', env.password]
+            sysopts = {}
+          end
+        end
+        if _.instance_of?(Wunderbar::JsonBuilder) or _.instance_of?(Wunderbar::TextBuilder)
+          _.system syscmd, sysopts, sysopts # needs two hashes
+        else
+          _.system syscmd, sysopts
         end
-        _.system syscmd
       ensure
         FileUtils.rm_rf tmpdir unless temp
       end


Mime
View raw message