[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Avoiding blocking the UI while running hook scripts?

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 21 Apr 2008 18:33:02 +0200

Roger Lipscombe wrote:

>> Maybe registering a window message which the script can send back to
>> the commit dialog with info once its finished could help. Such
>> messages can be sent even by other processes, so it would be possible
>> to start the script as a different process - that way the commit
>> dialog doesn't have to care about a thread still running.
>>
> This won't work for hook scripts that can't send registered window
> messages (e.g. VBScript).
>
> The background thread thing is a relatively easy fix: in RunScript,
> where we're waiting for the process to exit, simply add another handle,
> hAbandon. Closing the 'wait' dialog sets this handle and waits for the
> thread to finish. This will let the process continue to run happily; we
> just won't care about it. OK, the output is still redirected to
> temporary files, which we won't have a chance to clean up, but we could
> redirect to pipes instead.
>
> Alternatively, if you do want to use registered window messages, we
> could spawn another instance of TortoiseProc to host the hook script,
> and it could post the messages back. I'd prefer a different
> TortoiseHookRunner.exe, but that complicates the
> build/package/installation story.
>
> Let me know your thoughts and then I'll press on with an implementation...

I think this now gets way too complicated. We should instead implement a
COM interface which the scripts can call to send data back.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net

Received on 2008-04-22 07:23:43 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.