Merge lp:~edwin-grubbs/launchpad/bug-667900-dsp-page-upstream-link-form into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Edwin Grubbs |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11950 |
Proposed branch: | lp:~edwin-grubbs/launchpad/bug-667900-dsp-page-upstream-link-form |
Merge into: | lp:launchpad |
Diff against target: |
234 lines (+76/-29) 5 files modified
lib/lp/registry/browser/distributionsourcepackage.py (+23/-4) lib/lp/registry/browser/tests/distributionsourcepackage-views.txt (+35/-1) lib/lp/registry/templates/distributionsourcepackage-index.pt (+9/-20) lib/lp/registry/templates/sourcepackage-upstream-connections.pt (+1/-0) lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt (+8/-4) |
To merge this branch: | bzr merge lp:~edwin-grubbs/launchpad/bug-667900-dsp-page-upstream-link-form |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code + ui | Approve | |
j.c.sackett (community) | code* | Approve | |
Review via email: mp+41025@code.launchpad.net |
Commit message
[r=jcsackett,
Description of the change
Summary
-------
Display form on DistributionSou
sourcepackage does not have a link to an upstream project.
An upstream link isn't really needed for sourcepackages that are not
current or in development, so don't display the "Set upstream link" for
those older sourcepackages on this page.
Tests
-----
./bin/test -vv -t distributionsou
Demo and Q/A
------------
* Open http://
* If you remove the upstream link from the latest sourcepackage, a
form should be displayed.
> Edwin-- registry/ browser/ distributionsou rcepackage. py' registry/ browser/ distributionsou rcepackage. py 2010-11-06 06:52:31 +0000 registry/ browser/ distributionsou rcepackage. py 2010-11-17 00:32:27 +0000 launchpad. webapp. interfaces import IBreadcrumb launchpad. helpers import shortlist launchpad. webapp import ( adFacets, launchpad. webapp. breadcrumb import Breadcrumb launchpad. webapp. interfaces import IBreadcrumb launchpad. webapp. menu import ( with_permission , launchpad. webapp. sorting import sorted_ dotted_ numbers interfaces. launchpad import IServiceUsage browser. tales import CustomizableFor matter lazr.utils import smartquote browser. questiontarget import ( acetMixin, raversalMixin, interfaces. questionenums import QuestionStatus browser. tales import CustomizableFor matter interfaces. launchpad import IServiceUsage browser. bugtask import BugTargetTraver salMixin interfaces. bug import IBugSet browser. pillar import PillarBugsMenu urcePackage, interfaces. pocket import pocketsuffix interfaces. series import SeriesStatus propertycache import cachedproperty browser. sourcepackagere lease import ( bug_numbers,
>
> This is a really nicely done branch below. I have some comments, but they're mostly for my own edification, not issues with the code.
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -31,7 +31,6 @@
> Interface,
> )
>
> -from canonical.
> from canonical.
> from canonical.
> action,
> @@ -43,6 +42,7 @@
> StandardLaunchp
> )
> from canonical.
> +from canonical.
> from canonical.
> ApplicationMenu,
> enabled_
> @@ -50,14 +50,14 @@
> NavigationMenu,
> )
> from canonical.
> -from lp.app.
> -from lp.app.
> from canonical.
> from lp.answers.
> QuestionTargetF
> QuestionTargetT
> )
> from lp.answers.
> +from lp.app.
> +from lp.app.
> from lp.bugs.
> from lp.bugs.
> from lp.registry.
> @@ -68,6 +68,7 @@
> IDistributionSo
> )
> from lp.registry.
> +from lp.registry.
> from lp.services.
> from lp.soyuz.
> extract_
Thanks for cleaning up those imports.
> @@ -409,7 +410,7 @@ dict[package. distroseries] = package series( self): sourcepackage( self): active_ series) == 0: series[ 0].getSourcePac kage( sourcepackagena me) table(self) : by_series[ distroseries] ....
> packages_
> return packages_dict
>
> - @property
> + @cachedproperty
> def active_
> """Return active distroseries where this package is published.
>
> I have to confess to a lack of understanding on cachedproperty--I assume this doesn't change often enough for caching to present a problem? I can see where not caching could produce performance issues, particularly with the increased calls to this method in your other changes. This isn't a problem with the code, just me asking for my own edification.
>
>
> @@ -438,6 +439,13 @@
> return pocket_dict
>
> @property
> + def latest_
> + if len(self.
> + return None
> + return self.active_
> + self.context.
> +
> + @property
> def version_
> """Rows of data for the template to render in the packaging table."""
> rows = []
> @@ -446,6 +454,16 @@
> # The first row for each series is the "title" row.
> packaging = packages_