From 5d4e49c0231bdbcf877d0534782c6adf687eccae Mon Sep 17 00:00:00 2001 From: Stephen Haberman Date: Sun, 12 Oct 2008 23:33:17 -0500 Subject: [PATCH] Use a 0.11 idioim for tracking cnum. Seems to have fixed a cnum stomp I had happen tonight (but have not exhaustively reproduced). --- server/post-receive-trac.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/post-receive-trac.py b/server/post-receive-trac.py index a615aa6..5787c6a 100644 --- a/server/post-receive-trac.py +++ b/server/post-receive-trac.py @@ -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) -- 2.39.5