launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #19907
[Merge] lp:~blr/launchpad/bug-1536363-codereviewcomment-reply-git-oops into lp:launchpad
Kit Randel has proposed merging lp:~blr/launchpad/bug-1536363-codereviewcomment-reply-git-oops into lp:launchpad.
Commit message:
The codereviewcomment-reply template should use the generalised attributes merge_source and identify to render the view correctly for git.
Fixes bug #1536363
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1536363 in Launchpad itself: "oops when replying to a comment on a MP"
https://bugs.launchpad.net/launchpad/+bug/1536363
For more details, see:
https://code.launchpad.net/~blr/launchpad/bug-1536363-codereviewcomment-reply-git-oops/+merge/283382
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~blr/launchpad/bug-1536363-codereviewcomment-reply-git-oops into lp:launchpad.
=== modified file 'lib/lp/code/browser/tests/test_codereviewcomment.py'
--- lib/lp/code/browser/tests/test_codereviewcomment.py 2015-08-18 08:49:54 +0000
+++ lib/lp/code/browser/tests/test_codereviewcomment.py 2016-01-21 03:28:59 +0000
@@ -169,6 +169,13 @@
disposition = 'attachment; filename="comment-%d.txt"' % comment.id
self.assertEqual(disposition, browser.headers['Content-disposition'])
+ def test_parent_comment_in_reply(self):
+ """The reply view has the expected contents from the parent comment."""
+ contents = u'test-comment'.encode('utf-8')
+ comment = self.makeCodeReviewComment(body=contents)
+ browser = self.getViewBrowser(comment, view_name='+reply')
+ self.assertIn(contents, browser.contents)
+
class TestCodeReviewCommentHtmlBzr(
TestCodeReviewCommentHtmlMixin, BrowserTestCase):
=== modified file 'lib/lp/code/templates/codereviewcomment-reply.pt'
--- lib/lp/code/templates/codereviewcomment-reply.pt 2009-08-24 02:20:49 +0000
+++ lib/lp/code/templates/codereviewcomment-reply.pt 2016-01-21 03:28:59 +0000
@@ -6,15 +6,13 @@
metal:use-macro="view/macro:page/main_only"
i18n:domain="launchpad">
-<body>
-
- <h1 metal:fill-slot="heading"
- tal:define="branch view/branch_merge_proposal/source_branch">
- Code review comment for <tal:source content="branch/bzr_identity"/>
+ <body>
+ <h1 metal:fill-slot="heading"
+ tal:define="branch view/branch_merge_proposal/merge_source">
+ Code review comment for <tal:source content="branch/identity"/>
</h1>
<div metal:fill-slot="main">
-
<tal:previous tal:condition="view/is_reply">
<tal:content replace="structure view/reply_to/@@+render"/>
</tal:previous>
Follow ups