Yeah, yeah, I'm still stuck with CentOS 5, using GTK 2.10.4 with pygtk
2.10.1.  This recent changeset breaks "hgtk log" for me:

changeset:   6129:fabcf89b8242
branch:      stable
parent:      6126:9c25484a5a67
user:        Yuya Nishihara <y...@tcha.org>
date:        2010-03-11 23:33:05 +0900
files:
  M tortoisehg/hgtk/commit.py
  M tortoisehg/hgtk/gtklib.py
  M tortoisehg/hgtk/history.py
description:
hggtk: show tag/branch name with underline correctly

The stack trace is pretty clear:

{{{
#!python
** Please report this bug to
http://bitbucket.org/tortoisehg/stable/issues or
tortoisehg-disc...@lists.sourceforge.net
** Mercurial version (1.4.1+20091216-ims01.el5).  TortoiseHg version
(1.0+56-fabcf89b8242)
** Command: log
** CWD: /home/gward/src/tortoisehg
** Extensions loaded: record, transplant, mq, graphlog, extdiff,
purge, rebase, children, share, ims.hg.clonerc
Traceback (most recent call last):
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/hgtk.py", line 69,
in dispatch
    return _runcatch(u, args)
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/hgtk.py", line 197,
in _runcatch
    return runcommand(ui, args)
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/hgtk.py", line 266,
in runcommand
    return _runcommand(lui, options, cmd, d)
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/hgtk.py", line 317,
in _runcommand
    return checkargs()
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/hgtk.py", line 271,
in checkargs
    return cmdfunc()
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/hgtk.py", line 265,
in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/python2.4/site-packages/mercurial/util.py", line 386, in check
    return func(*args, **kwargs)
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/hgtk.py", line 429, in log
    gtkrun(run, ui, *pats, **opts)
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/hgtk.py", line 333, in gtkrun
    win.display()
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/gdialog.py", line
257, in display
    self._setup_gtk()
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/gdialog.py", line
474, in _setup_gtk
    body = self.get_body()
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/history.py", line
1536, in get_body
    accelgroup, self.tooltips)
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/thgmq.py", line
126, in __init__
    menubtn.set_menu(self.create_view_menu())
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/thgmq.py", line
831, in create_view_menu
    colappend(_('Index'), MQ_INDEX)
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/thgmq.py", line
828, in colappend
    item = m.append(label, handler, ascheck=True, check=active)
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/gtklib.py", line
805, in append
    menu = create_menuitem(*a, **k)
  File "/home/gward/src/tortoisehg/tortoisehg/hgtk/gtklib.py", line
789, in create_menuitem
    menu.set_use_underline(kargs.get('use_underline', True))
AttributeError: 'gtk.CheckMenuItem' object has no attribute 'set_use_underline'
}}}

This crude hack "fixes" it for me:
{{{
--- a/tortoisehg/hgtk/gtklib.py
+++ b/tortoisehg/hgtk/gtklib.py
@@ -786,7 +786,8 @@
         args = kargs.get('args', [])
         menu.connect('activate', handler, *args)
     menu.set_sensitive(kargs.get('sensitive', True))
-    menu.set_use_underline(kargs.get('use_underline', True))
+    if hasattr(menu, 'set_user_underline'):
+        menu.set_use_underline(kargs.get('use_underline', True))
     menu.set_border_width(1)
     return menu
}}}
...but of course, branch and tag names are not underlined in the
current changeset.  Big deal.  That's better than not being able to
run THG at all!

Greg

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to