Merge lp://staging/~julian-edwards/launchpad/dsp-changelog-bug-419147 into lp://staging/launchpad

Proposed by Julian Edwards
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~julian-edwards/launchpad/dsp-changelog-bug-419147
Merge into: lp://staging/launchpad
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~julian-edwards/launchpad/dsp-changelog-bug-419147
Reviewer Review Type Date Requested Status
Gavin Panella (community) code Approve
Review via email: mp+10730@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

= Summary =
Add DistributionSourcePackage:+changelog

== Proposed fix ==
The current DSP page has a change log section at the bottom. As part of the
3.0 redesign, this is being moved to a separate page. This branch adds that
page ahead of the redesign.

== Implementation details ==
Note that the new page is not linked to yet, that will only happen in the
final redesign. When I land that branch, I will amend the XXX in the changed
test in this branch so it follows the link.

Otherwise, this is a pretty trivial change.

== Tests ==
bin/test -vvt xx-distribution-packages.txt

== Demo and Q/A ==
https://launchpad.dev/ubuntu/+source/alsa-utils/+changelog

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/registry/browser/configure.zcml
  lib/lp/registry/browser/distributionsourcepackage.py
  lib/lp/registry/stories/distribution/xx-distribution-packages.txt

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Because I am a numpty, I forgot to add the new template, its diff is here:

=== added file 'lib/lp/registry/templates/distributionsourcepackage-changelog.pt'
--- lib/lp/registry/templates/distributionsourcepackage-changelog.pt 1970-01-01 00:00:00 +0000
+++ lib/lp/registry/templates/distributionsourcepackage-changelog.pt 2009-08-26 11:08:27 +0000
@@ -0,0 +1,26 @@
+<html
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:tal="http://xml.zope.org/namespaces/tal"
+ xmlns:metal="http://xml.zope.org/namespaces/metal"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+ metal:use-macro="view/macro:page/main_only"
+ i18n:domain="launchpad"
+>
+
+<body>
+<div metal:fill-slot="main">
+
+<div class="top-portlet">
+ <h1>
+ Version history
+ </h1>
+
+ <tal:block
+ repeat="dspr view/releases"
+ replace="structure dspr/@@+changes">
+ </tal:block>
+</div>
+
+</div>
+</body>
+</html>

Revision history for this message
Gavin Panella (allenap) wrote :

If you can, please add a bug= to the XXX. Other than that, it's perfect :)

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/registry/browser/configure.zcml'
--- lib/lp/registry/browser/configure.zcml 2009-08-23 01:55:48 +0000
+++ lib/lp/registry/browser/configure.zcml 2009-08-26 11:31:57 +0000
@@ -488,13 +488,18 @@
488 module="lp.registry.browser.distributionsourcepackage"488 module="lp.registry.browser.distributionsourcepackage"
489 classes="489 classes="
490 DistributionSourcePackageNavigation"/>490 DistributionSourcePackageNavigation"/>
491 <browser:page491 <browser:pages
492 for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"492 for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"
493 class="lp.registry.browser.distributionsourcepackage.DistributionSourcePackageView"493 class="lp.registry.browser.distributionsourcepackage.DistributionSourcePackageView"
494 permission="zope.Public"
495 name="+index"
496 facet="overview"494 facet="overview"
497 template="../templates/distributionsourcepackage-index.pt"/>495 permission="zope.Public">
496 <browser:page
497 name="+index"
498 template="../templates/distributionsourcepackage-index.pt"/>
499 <browser:page
500 name="+changelog"
501 template="../templates/distributionsourcepackage-changelog.pt"/>
502 </browser:pages>
498 <browser:page503 <browser:page
499 for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"504 for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"
500 permission="launchpad.Edit"505 permission="launchpad.Edit"
501506
=== modified file 'lib/lp/registry/browser/distributionsourcepackage.py'
--- lib/lp/registry/browser/distributionsourcepackage.py 2009-08-24 20:28:33 +0000
+++ lib/lp/registry/browser/distributionsourcepackage.py 2009-08-26 12:06:40 +0000
@@ -126,6 +126,10 @@
126126
127class DistributionSourcePackageView(LaunchpadFormView):127class DistributionSourcePackageView(LaunchpadFormView):
128128
129 @property
130 def page_title(self):
131 return self.context.title
132
129 def setUpFields(self):133 def setUpFields(self):
130 """See `LaunchpadFormView`."""134 """See `LaunchpadFormView`."""
131 # No schema is set in this form, because all fields are created with135 # No schema is set in this form, because all fields are created with
132136
=== modified file 'lib/lp/registry/stories/distribution/xx-distribution-packages.txt'
--- lib/lp/registry/stories/distribution/xx-distribution-packages.txt 2009-07-10 12:45:54 +0000
+++ lib/lp/registry/stories/distribution/xx-distribution-packages.txt 2009-08-26 12:05:05 +0000
@@ -208,9 +208,14 @@
208 >>> link.text208 >>> link.text
209 "...more untrusted versions of..."209 "...more untrusted versions of..."
210210
211/$DISTRO/+source/$PACKAGE pages contain a version history that lists211/$DISTRO/+source/$PACKAGE/+changelog pages contain a version history that lists
212each published version of a package with its changelog entry for that212each published version of a package with its changelog entry for that version.
213version.213
214XXX julian 2009-08-26
215The +changelog page is currently NOT linked from +index. The index page is
216currently undergoing a redesign and the link to it will be added therein.
217Until then, +changelog is a hidden page, but needs to land ahead of that
218redesign.
214219
215Each version history entry has a header with the version as the title220Each version history entry has a header with the version as the title
216and details of the publishing status in each distroseries it's published221and details of the publishing status in each distroseries it's published
@@ -218,16 +223,17 @@
218223
219Package "foobar" is deleted:224Package "foobar" is deleted:
220225
221 >>> browser.open("http://launchpad.dev/ubuntu/+source/foobar/")226 >>> browser.open("http://launchpad.dev/ubuntu/+source/foobar/+changelog")
222 >>> first_header = find_tag_by_id(browser.contents,227 >>> first_header = find_tag_by_id(browser.contents,
223 ... "detail_foobar_1.0")228 ... "detail_foobar_1.0")
224 >>> print extract_text(first_header)229 >>> print extract_text(first_header)
225 1.0 230 1.0
226 Deleted in warty-release on 2006-12-02 (Reason: I do not like it.)231 Deleted in warty-release on 2006-12-02 (Reason: I do not like it.)
227232
228Package "alsa-utils" is pending in Warty and published in Hoary:233Package "alsa-utils" is pending in Warty and published in Hoary:
229234
230 >>> browser.open("http://launchpad.dev/ubuntu/+source/alsa-utils/")235 >>> browser.open(
236 ... "http://launchpad.dev/ubuntu/+source/alsa-utils/+changelog")
231 >>> first_header = find_tag_by_id(browser.contents,237 >>> first_header = find_tag_by_id(browser.contents,
232 ... 'detail_alsa-utils_1.0.9a-4ubuntu1')238 ... 'detail_alsa-utils_1.0.9a-4ubuntu1')
233 >>> print extract_text(first_header)239 >>> print extract_text(first_header)
@@ -264,7 +270,8 @@
264If we view the same page as a logged-in user, we can see the email270If we view the same page as a logged-in user, we can see the email
265address:271address:
266272
267 >>> user_browser.open("http://launchpad.dev/ubuntu/+source/alsa-utils/")273 >>> user_browser.open(
274 ... "http://launchpad.dev/ubuntu/+source/alsa-utils/+changelog")
268 >>> print extract_text(find_tag_by_id(user_browser.contents,275 >>> print extract_text(find_tag_by_id(user_browser.contents,
269 ... 'body_alsa-utils_1.0.9a-4ubuntu1'))276 ... 'body_alsa-utils_1.0.9a-4ubuntu1'))
270 alsa-utils (1.0.9a-4ubuntu1) hoary; urgency=low277 alsa-utils (1.0.9a-4ubuntu1) hoary; urgency=low
@@ -295,7 +302,8 @@
295If the package being viewed has no publishing history, a blank table is302If the package being viewed has no publishing history, a blank table is
296displayed:303displayed:
297304
298 >>> user_browser.open("http://launchpad.dev/ubuntu/+source/a52dec")305 >>> user_browser.open(
306 ... "http://launchpad.dev/ubuntu/+source/a52dec/")
299 >>> print extract_text(find_tag_by_id(user_browser.contents, 'packaging'))307 >>> print extract_text(find_tag_by_id(user_browser.contents, 'packaging'))
300 Ubuntu version Upstream version308 Ubuntu version Upstream version
301309
@@ -313,7 +321,7 @@
313 ... print extract_text(section.div)321 ... print extract_text(section.div)
314322
315 >>> anon_browser.open(323 >>> anon_browser.open(
316 ... "http://launchpad.dev/ubuntu/+source/alsa-utils/")324 ... "http://launchpad.dev/ubuntu/+source/alsa-utils/+changelog")
317325
318 >>> print_displayed_versions(anon_browser.contents)326 >>> print_displayed_versions(anon_browser.contents)
319 1.0.9a-4ubuntu1327 1.0.9a-4ubuntu1