On Mon, Aug 24, 2009 at 3:33 PM, Greg Ward<g...@gerg.ca> wrote: > Hi all -- > > I'm trying to get THG working on CentOS 5, using Python 2.4, gtk 2.10, > and PyGTK 2.10. I got a SyntaxError because thgconfig.py uses the new > "x if cond else y" syntax. I haven't seen any docs stating which > Python version THG requires. So, if it's supposed to support 2.4, > here's a fix for that problem: > > """ > # HG changeset patch > # User Greg Ward <gw...@intelerad.com> > # Date 1251143134 14400 > # Branch stable > # Node ID 3316fbbca58abc1358cff5236c0c7a24cc2748e9 > # Parent d7a64ec19887eb89879c520d80ab7295308f4445 > thgconfig: do not use Python 2.5 syntax > > diff --git a/hggtk/thgconfig.py b/hggtk/thgconfig.py > --- a/hggtk/thgconfig.py > +++ b/hggtk/thgconfig.py > @@ -292,7 +292,7 @@ > # other entries > for n, (e, l, h) in self.entries.iteritems(): > if enable: > - handler = self.changedurl if n == 'URL' else self.changed > + handler = (n == 'URL' and self.changedurl or self.changed) > self.entries[n][2] = e.connect('changed', handler) > else: > if e.handler_is_connected(h): > """ > > If 2.4 is not the minimum Python version, what is?
We would like to stay in line with Mercurial for minimal Python version, so 2.4 is our target. Feel free to report any other such violations. -- Steve Borho ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop