Skip to content

Commit

Permalink
Standardise on options
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Mar 2, 2024
1 parent 69eac74 commit 8b3de73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/whimsy/asf/svn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -439,15 +439,15 @@ def self.svn!(command, path, options = {})
# 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
Expand Down

0 comments on commit 8b3de73

Please sign in to comment.