Calling ui.traceback()
Frank A. Kingswood
frank at kingswood-consulting.co.uk
Sun Feb 21 06:59:55 CST 2010
Dirkjan Ochtman wrote:
> On Sun, Feb 21, 2010 at 07:04, Frank A. Kingswood
> <frank at kingswood-consulting.co.uk> wrote:
>
>> Hallo!
>>
>> In the Perfarce extension I'm calling ui.traceback() in some exception
>> handlers to get some useful info when the user specifies --traceback.
>> This fails on old versions of Mercurial, where traceback can be None.
>>
>
> How old?
>
This would be 1.0.1 as included in Debian Lenny.
>> Changing the code to
>>
>> if ui.traceback:ui.traceback()
>>
>> works but I'm not sure this is the right way to handle this.
>>
>
> Why would it not be the right way?
>
Well, I worried about what might happen if ui.traceback was something
else in the versions in between. I see that not a lot of code calls
ui.traceback().
Frank
--
------------------------------------------------------------------------
Frank A. Kingswood frank at kingswood-consulting.co.uk
Cambridge, United Kingdom +44-870-095 0000
More information about the Mercurial-devel
mailing list