[PATCH 0 of 3] Progress indicator

TK Soh teekaysoh at gmail.com
Mon Jul 23 20:17:08 CDT 2007


On 7/24/07, Matt Mackall <mpm at selenic.com> wrote:
> On Tue, Jul 24, 2007 at 08:49:35AM +0800, TK Soh wrote:
> > On 7/23/07, Thomas Arendsen Hein <thomas at intevation.de> wrote:
> > > Hi!
> > >
> > > The following patches add a progress indicator for 'hg update' and
> > > 'hg merge'. Support for other commands is planned, most notably
> > > network operations.
> >
> > Is there a way for external script/apps to tap into the progress
> > indicator? I wish to use to utilize the mechanism for displaying
> > progress graphically in TortoiseHg.
>
> Is TortoiseHG using Mercurial as a library? If so, it can add its own
> ui subclass!

Yes, TortoiseHg is using Mercurial as a library.

I've earlier attempted to subclass ui, mainly as a mean to capture
Mercurial's output and feed them into a log window, but ran into
problems.

I also hope to use the ui subclass as a way to interrupt Mercurial's
operations as they are run in the a separate thread (AFAIK, interrupts
are not supported in threads), with PyGtk running in main thread.

I've not been able to find much info on google, so I'd appreciate any
help the list can provide.

BTW, one problem I noticed is that 'repo = hg.repository()' would
still call for the stocked ui class, ignoring the ui subclass object
that was passed into the function. The only workaround I can find is
to manually override repo.ui with my ui subclass again, making things
a little too messy for my taste. I can't explain everything so well
here. Hopefully it's clear enough for the gurus.


More information about the Mercurial-devel mailing list