The existing code for TicketSystem._format_link has the following check:

     if 0 < num <= 2 << 30:

On my machine (with python 2.3), 2 << 30 is -2147483648.

The code seems to magically work if that is changed to:

     if 0 < num <= 2L << 30:

- Dave


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Index: trac/ticket/api.py
===================================================================
--- trac/ticket/api.py	(revision 4938)
+++ trac/ticket/api.py	(working copy)
@@ -251,7 +251,7 @@
             if len(r) == 1:
                 num = r.a
                 ctx = formatter.context('ticket', num)
-                if 0 < num <= 2 << 30: # TODO: implement ctx.exists()
+                if 0 < num <= 2L << 30: # TODO: implement ctx.exists()
                     # status = ctx.resource['status']  -> currently expensive
                     cursor = formatter.db.cursor() 
                     cursor.execute("SELECT type,summary,status,resolution "

Reply via email to