Merge lp://qastaging/~allenap/launchpad/indexed-messages-in-order into lp://qastaging/launchpad

Proposed by Gavin Panella
Status: Merged
Approved by: Данило Шеган
Approved revision: not available
Merged at revision: not available
Proposed branch: lp://qastaging/~allenap/launchpad/indexed-messages-in-order
Merge into: lp://qastaging/launchpad
Diff against target: 17 lines (+3/-2)
1 file modified
lib/lp/bugs/model/bug.py (+3/-2)
To merge this branch: bzr merge lp://qastaging/~allenap/launchpad/indexed-messages-in-order
Reviewer Review Type Date Requested Status
Данило Шеган (community) release-critical Approve
Deryck Hodge (community) code Approve
Review via email: mp+16135@code.qastaging.launchpad.net

Commit message

Preserve message ordering in Bug.indexed_messages.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

Keep the ordering of Bug.messages in Bug.indexed_messages

Revision history for this message
Deryck Hodge (deryck) wrote :

Looks good, and fixes two test failures abentley reported to me.

review: Approve (code)
Revision history for this message
Данило Шеган (danilo) wrote :

This reduces the changes of spurious test failures (some have hit them locally as well, and I don't want them during rollout). It also fixes a bug, but I care about the former more :)

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/model/bug.py'
2--- lib/lp/bugs/model/bug.py 2009-12-12 10:07:32 +0000
3+++ lib/lp/bugs/model/bug.py 2009-12-14 15:36:15 +0000
4@@ -271,10 +271,11 @@
5 def indexed_messages(self):
6 """See `IMessageTarget`."""
7 inside = self.default_bugtask
8- message_set = set(self.messages)
9+ messages = list(self.messages)
10+ message_set = set(messages)
11
12 indexed_messages = []
13- for index, message in enumerate(message_set):
14+ for index, message in enumerate(messages):
15 if message.parent not in message_set:
16 parent = None
17 else: