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
=== modified file 'lib/lp/bugs/model/bug.py'
--- lib/lp/bugs/model/bug.py 2009-12-12 10:07:32 +0000
+++ lib/lp/bugs/model/bug.py 2009-12-14 15:36:15 +0000
@@ -271,10 +271,11 @@
271 def indexed_messages(self):271 def indexed_messages(self):
272 """See `IMessageTarget`."""272 """See `IMessageTarget`."""
273 inside = self.default_bugtask273 inside = self.default_bugtask
274 message_set = set(self.messages)274 messages = list(self.messages)
275 message_set = set(messages)
275276
276 indexed_messages = []277 indexed_messages = []
277 for index, message in enumerate(message_set):278 for index, message in enumerate(messages):
278 if message.parent not in message_set:279 if message.parent not in message_set:
279 parent = None280 parent = None
280 else:281 else: