]> git.droids-corp.org - git-central.git/commitdiff
Use a 0.11 idioim for tracking cnum. Seems to have fixed a cnum stomp I had
authorStephen Haberman <shaberman@payflex.com>
Mon, 13 Oct 2008 04:33:17 +0000 (23:33 -0500)
committerStephen Haberman <shaberman@payflex.com>
Mon, 13 Oct 2008 04:37:14 +0000 (23:37 -0500)
happen tonight (but have not exhaustively reproduced).

server/post-receive-trac.py

index a615aa60397d9fc2fb8bce0763c0b78c470bd5a6..5787c6a08e080d292ba906ac6d7a6c407f9fb9f4 100644 (file)
@@ -58,8 +58,9 @@ for ticketId, commands in tickets.iteritems():
        cnum = 0
        tm = TicketModule(env)
        for change in tm.grouped_changelog_entries(ticket, db):
-               if change['permanent']:
-                       cnum += 1
+               c_cnum = change.get('cnum', None)
+               if c_cnum and int(c_cnum) > cnum:
+                       cnum = int(c_cnum)
 
        username = authorPattern.findall(author)[0]
        now = datetime.now(utc)