Merge lp:~jcsackett/launchpad/new-releases-636060 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Graham Binns | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 11752 | ||||
Proposed branch: | lp:~jcsackett/launchpad/new-releases-636060 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
113 lines (+48/-2) 4 files modified
lib/lp/registry/interfaces/productseries.py (+5/-0) lib/lp/registry/model/productseries.py (+7/-1) lib/lp/registry/templates/sourcepackage-upstream-connections.pt (+7/-0) lib/lp/registry/tests/test_productseries.py (+29/-1) |
||||
To merge this branch: | bzr merge lp:~jcsackett/launchpad/new-releases-636060 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+38773@code.launchpad.net |
Commit message
Adds latest upstream release version to the sourcepackage upstream portlet.
Description of the change
Summary
=======
There's a section showing upstream info on sourcepackages, but it doesn't show the upstream version/release; you have to click links to see that which is both cumbersome and silly.
This branch adds the latest release version info to the upstream portlet to remedy that.
Proposed fix
============
Get the latest release from ProductSeries.
Preimplementation talk
=======
Spoke with Curtis Hovey.
Implementation details
=======
Largely as in proposed. A new method, getLatestRelease, provides the relevant release information.
Tests
=====
bin/test -t TestProductSeri
bin/test -t sourcepackage-
Q&A
===
Open https:/
You should see "Latest version" as part of the upstream data.
Lint
====
make lint output:
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
A few comments:
> 8 + def getLatestRelease():
> 9 + """Gets the most recent release in the series.
> 10 +
> 11 + Returns None if there is no release."""
> 12 +
The closing """ of a multi-line docstring should be on its own line.
> 89 + def setUp(self): ctSeriesRelease s, self).setUp() makeProduct( ) makeProductSeri es( self.product) elease( self): ies.getLatestRe lease() ) makeProductRele ase( self.product, self.productser ies) l(release, self.productser ies.getLatestRe lease() ) makeProductRele ase( self.product, self.productser ies)
> 90 + super(TestProdu
> 91 + self.product = self.factory.
> 92 + self.productseries = self.factory.
> 93 + product=
> 94 +
> 95 + def test_getLatestR
> 96 + # getLatestRelease returns the most recent release.
> 97 + self.assertIs(None, self.productser
> 98 +
> 99 + release = self.factory.
> 100 + product=
> 101 + productseries=
> 102 + self.assertEqua
> 103 +
> 104 + second_release = self.factory.
> 105 + product=
> 106 + productseries=
We indent parameters on method calls by four spaces, e.g.:
second_release = self.factory. makeProductRele ase(
product= self.product, productseries= self.productser ies)