Code review comment for lp:~thumper/launchpad/revisions-in-conversation

Revision history for this message
Tim Penhey (thumper) wrote :

This branch adds in grouped revisions on the merge proposal page.

When the scanner scans a branch, all the revisions added at that time have the same date_created. We use this time to work out where in the conversation to put the revisions.

The revision rendering is exactly the same as where we render revisions elsewhere, including the date the revision created at the remote end. The revision numbers are hyperlinked to codebrowse.

To play locally, you can do what I did and enter the following into 'make harness'

import pytz
from canonical.launchpad.webapp import canonical_url
from lp.code.tests.helpers import add_revision_to_branch

bmp = factory.makeBranchMergeProposal()
review_date = datetime(2009, 9, 10, tzinfo=pytz.UTC)
bmp.requestReview(review_date)

revision_date = review_date + timedelta(days=1)
revisions = []
for date in range(2):
    revisions.append(
        add_revision_to_branch(
            factory, bmp.source_branch, revision_date))
    revisions.append(
        add_revision_to_branch(
            factory, bmp.source_branch, revision_date))
    revision_date += timedelta(days=1)

print canonical_url(bmp)

Then open up that url to see the joy.

« Back to merge proposal