The following is excerpted from memstat.json.rb. It assumes that we have moved
all of the emeritus files from subdirectories of documents to subdirectories of
documents/Emeritus.
EMERITUS_DIR = ASF::SVN['documents/Emeritus']
... after the update of members.txt
# update the emeritus files
if @action == 'emeritus'
_svn.update (EMERITUS_DIR, 'Update emeritus file', env, _ do ||
_.system "svn mv emeritus-requests-received/{@emeritusfilename} emeritus"
end
elsif @action == 'rescind_emeritus'
_svn.update (EMERITUS_DIR, 'Update emeritus file', env, _ do ||
_.system "svn mv emeritus-requests-received/{@emeritusfilename}
emeritus-requests-rescinded"
end
end
WDYT?
Craig
> On May 31, 2020, at 10:44 AM, Craig Russell <[email protected]> wrote:
>
>
>
>> On May 31, 2020, at 10:36 AM, Craig Russell <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>>
>>
>>> On May 31, 2020, at 5:55 AM, Sam Ruby <[email protected]
>>> <mailto:[email protected]>> wrote:
>>>
>>> On Sun, May 31, 2020 at 12:50 AM Craig Russell <[email protected]
>>> <mailto:[email protected]>> wrote:
>>>>
>>>> So now I just need an example of svn code executed with no update block
>>>> and some code executed inside the update block.
>>>
>>> Publishing minutes after a board meeting involves a number of updates
>>> to different svn repositories:
>>>
>>> https://github.com/apache/whimsy/blob/master/www/board/agenda/views/actions/publish.json.rb
>>>
>>> <https://github.com/apache/whimsy/blob/master/www/board/agenda/views/actions/publish.json.rb>
>>>
>>> This example shows issuing svn commands within the block.
>>>
>>> A few things to note:
>>>
>>> 1) If the block only takes one argument, then it is provided with a
>>> tmpdir only. It is up to you to do any and all svn commands except
>>> for the final commit.
>>
>>>
>>> 2) While you can spawn any command within the block (svn or otherwise)
>>> any way you like, wunderbar provides an _.system method that will
>>> capture the stdout and stderr and add it to the transcript provided in
>>> the response back to the client.
>>>
>>> 3) As sebb points out, a full temporary checkout of a directory like
>>> https://svn.apache.org/repos/private//documents
>>> <https://svn.apache.org/repos/private//documents> would be impractical.
>>> Perhaps instead of emeritus-rejoined, emeritus-requests-received, and
>>> emeritus-requests-rescinded directories that are sister directories to
>>> the emeritus directory, there could be a single emeritus directory
>>> which contains a number of subdirectories. An example of such a
>>> structure is https://svn.apache.org/repos/private/financials/Bills
>>> <https://svn.apache.org/repos/private/financials/Bills>.
>>
>> Here's a way forward that changes a lot but makes the technical solution
>> easier.
>>
>> svn mkdir foundation/Members
>> svn mv foundation/members.txt foundation/Members
>> svn mv documents/emeritus foundation/Members
>> svn mv documents/emeritus-requests-received foundation/Members
>> svn mv documents/emeritus-requests-rescinded foundation/Members
>> svn mv documents/emeritus-reinstated foundation/Members
>>
>> Then, the _svn.update would checkout the entire Members directory which
>> consists solely of the members.txt and the various emeritus files. And the
>> _svn.update function would commit everything or nothing.
>>
>> An alternative is to do the _svn.update of members.txt first and if
>> successful, do the move of the emeritus files, which unless something is
>> seriously messed up, will "always succeed".
>
> In order for this to work we also need to implement part of the above, moving
> everything but members.txt to a new directory, which could be in
> documents/Members instead of foundation/Members. Then, the directory checked
> out in the _svn.update would be the documents/Members directory which
> includes all of the emeritus files.
>
> This is probably my first choice because it's minimum disruption to the
> existing tools and will significantly help secretary in filing emeritus
> requests.
>
>
>>
>> Craig
>>
>>
>>>
>>>> Thanks,
>>>> Craig
>>>
>>
>> Craig L Russell
>> [email protected] <mailto:[email protected]>
>>
>
> Craig L Russell
> [email protected] <mailto:[email protected]>
Craig L Russell
[email protected]