On Thu, Apr 7, 2011 at 11:49 PM, Peer Sommerlund
<peer.sommerl...@gmail.com> wrote:
> Hi List
> I'm working on the pbranch support, and experimenting with some of the
> suggested-but-yet-unspported commands for this extension. I do this by
> executing several Mercurial commands mixed with file system operations.
> This means that simply making a long list of commands and sending it to
> cmdui.Runner is not workable - I need to be able to execute some code
> between commands.
> What would be the best way to address this?
> Earlier I have tried calling the mercurial/pbranch functions directly. To
> make sure there was output in the TortoiseHg log window I set up a custom
> ui, but this feels very different from what all other TortoiseHg modules
> does.
> Right now I'm considering if I should set up an threading.Event to signal
> completion of commands, and then block the main thread.
> I could also set up another thread, just for this sequence of commands, and
> let the main thread continue, but keeping repo busycount positive for the
> whole period. I'm worried that releasing the main thread would allow
> TortoiseHg to start other commands on the same repo.

I think I would add a new signal to cmdui.Core that is emitted after
each of the sub-commands completes.  If pbranch performs any work in
the signal handler, it will happen between commands.

-- 
Steve Borho

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to