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 8b3de739 Standardise on options
8b3de739 is described below

commit 8b3de73917e8b6c927a0584a7e3485a6e8824aa5
Author: Sebb <s...@apache.org>
AuthorDate: Sat Mar 2 14:29:55 2024 +0000

    Standardise on options
---
 lib/whimsy/asf/svn.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index fd80a817..9e9de9a3 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -439,15 +439,15 @@ module ASF
     # Returns: [out, err], where:
     #  out = array of entries, each of which is an array of [commitid, 
committer, datestamp]
     #  err = error message (in which case out is nil)
-    def self.svn_commits(path, before, after, env=nil)
-      out, err = ASF::SVN.svn('log', path, {env: env, quiet: true, revision: 
"#{before}:#{after}"})
+    def self.svn_commits(path, before, after, options = {})
+      out, err = ASF::SVN.svn('log', path, options.merge({quiet: true, 
revision: "#{before}:#{after}"}))
       # extract lines starting with r1234, and split into fields
       return out&.scan(%r{^r\d+ .*})&.map {|k| k.split(' | ')}, err
     end
 
     # as for self.svn_commits, but failure raises an error
-    def self.svn_commits!(path, before, after, env=nil)
-      out, err = self.svn_commits(path, before, after, env)
+    def self.svn_commits!(path, before, after, options = {})
+      out, err = self.svn_commits(path, before, after, options = options)
       raise Exception.new("SVN command failed: #{err}") if out.nil?
       return out, err
     end

Reply via email to