[ANN] TortoiseHg for everyone else
Steve Borho
steve at borho.org
Thu Jan 17 11:31:59 CST 2008
On Thu, 2008-01-17 at 18:11 +0100, Marcin Kasperski wrote:
> >> Currently on my machine some commands fail with
> >>
> >> $ hgtk status
> >> (...)
> >> AssertionError: pygtk.require() must be called before importing gtk
> >
> > Near the top of the status.py file is:
> >
> > import pygtk
> > pygtk.require('2.0')
> > import gtk
> >
> > So that message is truly a mystery.
>
> Well, not such great one. The file
>
> hggtk/__init__.py
>
> is loaded before status.py is loaded. And this __init__.py contains
>
> import gtk
> from shlib import get_tortoise_icon
>
> gtk.window_set_default_icon_from_file(get_tortoise_icon("hg.ico"))
>
> So while the aforementioned pygtk.require is called, gtk is already
> loaded, therefore pygtk.require raises.
Fantastic. I've applied that to my repo.
> When I moved the pygtk.require from status.py to __init__.py, I
> clearly went further (I got some ugly error which clearly looks like
> gtk version mismatch - AttributeError: 'gtk.TreeView' object has no
> attribute 'set_rubber_banding' - neverthleess, it looks like require
> problem was solved)
Ah, I recently fixed this in the log browser. The set_rubber_banding
command is a recent PyGtk addition. I have now made it conditional.
Go ahead and pull these two fixes from me and let me know if you hit any
more snags.
> >> $ hgtk synch
> >> (...)
> >> mercurial.cmdutil.UnknownCommand: synch
> >>
> >> (same for userconfig, repoconfig)
> >
> > That is... hmm. What version of Mercurial do you have?
>
> 0.9.4 (Debian Testing)
ok, we should be able to get this to work, then. I'll back mine to
0.9.4 and fix these problems.
--
Steve Borho (steve at borho.org)
http://www.borho.org/~steve/steve.asc
Key fingerprint = 2D08 E7CF B624 624C DE1F E2E4 B0C2 5292 F2C6 2C8C
More information about the Mercurial
mailing list