I'm totally lost. I'd like to use a method that fits Sebb's documentation:
# DRAFT DRAFT DRAFT
# checkout file and update it using svnmucc put
# the block can return additional info, which is used
# to generate extra commands to pass to svnmucc
# which are included in the same commit
# The extra parameter is an array of commands
# These must themselves be arrays to ensure correct processing of
white-space
# Parameters:
# path - file path or SVN URL (http(s) or file:)
# message - commit message
# env - for username and password
# _ - Wunderbar context
# For example:
# ASF::SVN.multiUpdate(path,message,env,_) do |text|
# out = '...'
# extra = []
# url1 = 'https://svn.../' # etc
# extra << ['mv',url1,url2]
# extra << ['rm',url3]
# [out, extra]
# end
def self.multiUpdate(path, msg, env, _)
> On Jun 5, 2020, at 5:47 PM, Sam Ruby <[email protected]> wrote:
>
> My apologies. I was only looking at the syntax error.
>
> Sebb has developed a method that takes four positional parameters.
> You can call it as ASF::SVN.multi_update.
>
> Alternately, you can add a mutl_update method to
> www/roster/models/svn.rb which will take care of passing the env and _
> arguments for you. The current _svn.update method does take an
> options hash, so if you wish to continue this pattern, you would have
> to go back to specifying message: message.
>
> - Sam Ruby
>
> On Fri, Jun 5, 2020 at 8:10 PM Craig Russell <[email protected]
> <mailto:[email protected]>> wrote:
>>
>> Here's the memstat.json.rb block:
>>
>> # update members.txt only for secretary actions
>> _svn.multiUpdate members_txt, message do |dir, text|
>> # default command is empty
>> command = ""
>> # remove user's entry
>> unless text.sub! entry, '' # e.g. if the workspace was out of date
>> raise Exception.new("Failed to remove existing entry -- try refreshing")
>> end
>>
>> # determine where to put the entry
>> if @action == 'emeritus'
>>
>> Here's the new error message:
>> "exception": "#<NoMethodError: undefined method `multiUpdate' for
>> #<ASF::SVN::JsonBuilder:0x00007fc62b523160>>",
>> "backtrace": [
>>
>> "/Users/clr/apache/git/whimsy/www/roster/views/actions/memstat.json.rb:22:in
>> `_evaluate'",
>> "/Users/clr/apache/git/whimsy/www/roster/main.rb:204:in `block in <top
>> (required)>'",
>> "/Users/clr/apache/git/whimsy/lib/whimsy/asf/rack.rb:223:in `call'",
>>
>>> On Jun 5, 2020, at 5:02 PM, Sam Ruby <[email protected]> wrote:
>>>
>>> On Fri, Jun 5, 2020 at 6:55 PM Craig Russell <[email protected]
>>> <mailto:[email protected]> <mailto:[email protected]
>>> <mailto:[email protected]>>> wrote:
>>>>
>>>> I've pushed my changes (including debug messages) to github/gitbox, so
>>>> roster-emeritus branch is current.
>>>>
>>>> Testing one of the current non-test emeritus requestors, I have a failure
>>>> in memstat.json.rb.
>>>>
>>>> _ERROR #<SyntaxError:
>>>> /Users/clr/apache/git/whimsy/www/roster/views/actions/memstat.json.rb:22:
>>>> syntax error, unexpected ',', expecting =>
>>>> ...ers_txt, message: message, env, _ do |dir, text|
>>>> ... ^
>>>
>>> delete "message:"
>>>
>>>>>
>>>>
>>>> I thought I had called multiUpdate with the proper information but
>>>> obviously I missed something.
>>>>
>>>> Can someone please take a look? The non-update-members.txt part also needs
>>>> some review. I'm not quite sure how to call the svn mv command with the
>>>> proper credentials.
>>>>
>>>> Thanks,
>>>> Craig
>>>>
>>>> Craig L Russell
>>>> [email protected]
>>>
>>> - Sam Ruby
>>
>> Craig L Russell
>> [email protected]
Craig L Russell
[email protected]