launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #16472
Re: [Merge] lp:~cprov/launchpad/previewdiff-promotion into lp:launchpad
Review: Needs Fixing code
487 @property
488 + def displayname(self):
489 + """See `IPreviewDiff`."""
490 + bmp = self.branch_merge_proposal
491 + source_branch = bmp.source_branch.getBranchRevision(
492 + revision_id=self.source_revision_id).sequence
493 + target_branch = bmp.target_branch.getBranchRevision(
494 + revision_id=self.target_revision_id).sequence
495 +
496 + return u'r{0} into r{1}'.format(source_revno, target_revno)
It's not quite that simple, since the revision may no longer exist in the branch, or may not have a revno. I'd give a timestamp and then the revnos if they exist.
Also, "displayname" isn't a legal name for a non-legacy attribute. "display_name" works, but consider "title" like we use for eg. PackageDiff.
--
https://code.launchpad.net/~cprov/launchpad/previewdiff-promotion/+merge/208187
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
References