Merge lp:~michael.nelson/launchpad/211008-visual-indicator-superseded-pkgs into lp:launchpad/db-devel
- 211008-visual-indicator-superseded-pkgs
- Merge into db-devel
Proposed by
Michael Nelson
Status: | Merged |
---|---|
Approved by: | Michael Nelson |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~michael.nelson/launchpad/211008-visual-indicator-superseded-pkgs |
Merge into: | lp:launchpad/db-devel |
Diff against target: |
613 lines (+198/-81) 12 files modified
lib/canonical/launchpad/icing/style-3-0.css (+3/-0) lib/canonical/launchpad/javascript/lp/comment.js (+0/-1) lib/lp/code/browser/codereviewcomment.py (+4/-3) lib/lp/code/templates/branchmergeproposal-index.pt (+62/-27) lib/lp/registry/browser/team.py (+4/-2) lib/lp/soyuz/doc/publishing.txt (+33/-12) lib/lp/soyuz/interfaces/publishing.py (+5/-0) lib/lp/soyuz/model/publishing.py (+17/-16) lib/lp/soyuz/stories/ppa/xx-copy-packages.txt (+14/-13) lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt (+32/-1) lib/lp/soyuz/templates/archive-index.pt (+15/-4) lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt (+9/-2) |
To merge this branch: | bzr merge lp:~michael.nelson/launchpad/211008-visual-indicator-superseded-pkgs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Albisetti (community) | ui | Approve | |
Paul Hummer (community) | code ui | Approve | |
Canonical Launchpad Engineering | ui | Pending | |
Review via email: mp+15963@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Michael Nelson (michael.nelson) wrote : | # |
Revision history for this message
Paul Hummer (rockstar) : | # |
review:
Approve
(code)
Revision history for this message
Paul Hummer (rockstar) : | # |
review:
Approve
(code ui)
Revision history for this message
Martin Albisetti (beuno) wrote : | # |
Nothing to add, great job :)
review:
Approve
(ui)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/canonical/launchpad/icing/style-3-0.css' | |||
2 | --- lib/canonical/launchpad/icing/style-3-0.css 2009-12-07 13:53:47 +0000 | |||
3 | +++ lib/canonical/launchpad/icing/style-3-0.css 2009-12-11 15:59:14 +0000 | |||
4 | @@ -566,6 +566,9 @@ | |||
5 | 566 | background-repeat: no-repeat; | 566 | background-repeat: no-repeat; |
6 | 567 | background-position:right center; | 567 | background-position:right center; |
7 | 568 | } | 568 | } |
8 | 569 | table#packages_list tr.superseded { | ||
9 | 570 | background-color: #eee; | ||
10 | 571 | } | ||
11 | 569 | /* The following could be generalised for use to the following selector: | 572 | /* The following could be generalised for use to the following selector: |
12 | 570 | * .side .portlet li.nth-child(odd) | 573 | * .side .portlet li.nth-child(odd) |
13 | 571 | * if needed. */ | 574 | * if needed. */ |
14 | 572 | 575 | ||
15 | === modified file 'lib/canonical/launchpad/javascript/lp/comment.js' | |||
16 | --- lib/canonical/launchpad/javascript/lp/comment.js 2009-11-26 19:54:52 +0000 | |||
17 | +++ lib/canonical/launchpad/javascript/lp/comment.js 2009-12-11 15:59:14 +0000 | |||
18 | @@ -361,7 +361,6 @@ | |||
19 | 361 | }, | 361 | }, |
20 | 362 | renderUI: function() { | 362 | renderUI: function() { |
21 | 363 | CodeReviewComment.superclass.renderUI.apply(this); | 363 | CodeReviewComment.superclass.renderUI.apply(this); |
22 | 364 | Y.one('#inline-add-comment').setStyle('display', 'block'); | ||
23 | 365 | }, | 364 | }, |
24 | 366 | /** | 365 | /** |
25 | 367 | * Implementation of Widget.bindUI: Bind events to methods. | 366 | * Implementation of Widget.bindUI: Bind events to methods. |
26 | 368 | 367 | ||
27 | === modified file 'lib/lp/code/browser/codereviewcomment.py' | |||
28 | --- lib/lp/code/browser/codereviewcomment.py 2009-10-29 23:51:08 +0000 | |||
29 | +++ lib/lp/code/browser/codereviewcomment.py 2009-12-11 15:59:14 +0000 | |||
30 | @@ -204,7 +204,7 @@ | |||
31 | 204 | 204 | ||
32 | 205 | class MyDropWidget(DropdownWidget): | 205 | class MyDropWidget(DropdownWidget): |
33 | 206 | "Override the default no-value display name to -Select-." | 206 | "Override the default no-value display name to -Select-." |
35 | 207 | _messageNoValue = '-Select-' | 207 | _messageNoValue = 'Comment only' |
36 | 208 | 208 | ||
37 | 209 | schema = IEditCodeReviewComment | 209 | schema = IEditCodeReviewComment |
38 | 210 | 210 | ||
39 | @@ -251,10 +251,11 @@ | |||
40 | 251 | @action('Save Comment', name='add') | 251 | @action('Save Comment', name='add') |
41 | 252 | def add_action(self, action, data): | 252 | def add_action(self, action, data): |
42 | 253 | """Create the comment...""" | 253 | """Create the comment...""" |
43 | 254 | vote = data.get('vote') | ||
44 | 255 | review_type = data.get('review_type') | ||
45 | 254 | comment = self.branch_merge_proposal.createComment( | 256 | comment = self.branch_merge_proposal.createComment( |
46 | 255 | self.user, subject=None, content=data['comment'], | 257 | self.user, subject=None, content=data['comment'], |
49 | 256 | parent=self.reply_to, vote=data['vote'], | 258 | parent=self.reply_to, vote=vote, review_type=review_type) |
48 | 257 | review_type=data['review_type']) | ||
50 | 258 | 259 | ||
51 | 259 | @property | 260 | @property |
52 | 260 | def next_url(self): | 261 | def next_url(self): |
53 | 261 | 262 | ||
54 | === modified file 'lib/lp/code/templates/branchmergeproposal-index.pt' | |||
55 | --- lib/lp/code/templates/branchmergeproposal-index.pt 2009-11-26 23:36:50 +0000 | |||
56 | +++ lib/lp/code/templates/branchmergeproposal-index.pt 2009-12-11 15:59:14 +0000 | |||
57 | @@ -21,6 +21,24 @@ | |||
58 | 21 | #commit-message, #edit-commit-message { | 21 | #commit-message, #edit-commit-message { |
59 | 22 | margin: 1em 0 0 0; | 22 | margin: 1em 0 0 0; |
60 | 23 | } | 23 | } |
61 | 24 | #add-comment-form { | ||
62 | 25 | max-width: 60em; | ||
63 | 26 | padding-bottom: 3em; | ||
64 | 27 | } | ||
65 | 28 | #add-comment-form textarea{ | ||
66 | 29 | width: 100%; | ||
67 | 30 | max-width: inherit; | ||
68 | 31 | } | ||
69 | 32 | #add-comment-form .actions { | ||
70 | 33 | float: right; | ||
71 | 34 | margin: 0 -0.5em; | ||
72 | 35 | } | ||
73 | 36 | #add-comment-review-fields { | ||
74 | 37 | margin-top: 1em; | ||
75 | 38 | } | ||
76 | 39 | #add-comment-review-fields div { | ||
77 | 40 | display: inline; | ||
78 | 41 | } | ||
79 | 24 | /* A page-specific fix for inline text are editing to line up box. */ | 42 | /* A page-specific fix for inline text are editing to line up box. */ |
80 | 25 | #edit-commit-message .yui-ieditor-input { top: 0; } | 43 | #edit-commit-message .yui-ieditor-input { top: 0; } |
81 | 26 | </style> | 44 | </style> |
82 | @@ -92,6 +110,12 @@ | |||
83 | 92 | </div> | 110 | </div> |
84 | 93 | 111 | ||
85 | 94 | <div class="yui-g"> | 112 | <div class="yui-g"> |
86 | 113 | <tal:not-logged-in condition="not: view/user"> | ||
87 | 114 | <div align="center" id="add-comment-login-first"> | ||
88 | 115 | To post a comment you must <a href="+login">log in</a>. | ||
89 | 116 | </div> | ||
90 | 117 | </tal:not-logged-in> | ||
91 | 118 | |||
92 | 95 | <div tal:define="link menu/add_comment" | 119 | <div tal:define="link menu/add_comment" |
93 | 96 | tal:condition="link/enabled" | 120 | tal:condition="link/enabled" |
94 | 97 | tal:content="structure link/render"> | 121 | tal:content="structure link/render"> |
95 | @@ -101,20 +125,27 @@ | |||
96 | 101 | <div id="conversation" | 125 | <div id="conversation" |
97 | 102 | tal:content="structure view/conversation/@@+render"/> | 126 | tal:content="structure view/conversation/@@+render"/> |
98 | 103 | </div> | 127 | </div> |
113 | 104 | <!-- Hide inline commenting if YUI isn't used. --> | 128 | |
114 | 105 | <div id="inline-add-comment" style="display: none"> | 129 | <tal:logged-in condition="view/user"> |
115 | 106 | <tal:comment replace="structure context/@@+comment/++form++" /> | 130 | <div tal:define="comment_form nocall:context/@@+comment; |
116 | 107 | <div class="actions" id="launchpad-form-actions"> | 131 | dummy comment_form/initialize"> |
117 | 108 | <input type="submit" id="field.actions.add" name="field.actions.add" value="Save Comment" class="button" /> | 132 | <h2 id="add-comment">Add comment</h2> |
118 | 109 | </div> | 133 | <form action="+comment" |
119 | 110 | </div> | 134 | method="post" |
120 | 111 | 135 | enctype="multipart/form-data" | |
121 | 112 | <script type="text/javascript"> | 136 | accept-charset="UTF-8" |
122 | 113 | LPS.use('lp.comment', function(Y) { | 137 | id="add-comment-form"> |
123 | 114 | var comment = new Y.lp.CodeReviewComment(); | 138 | <tal:comment-input replace="structure comment_form/widgets/comment"/> |
124 | 115 | comment.render(); | 139 | <div id="add-comment-review-fields"> |
125 | 116 | }) | 140 | Review: <tal:review replace="structure comment_form/widgets/vote"/> |
126 | 117 | </script> | 141 | Review type: <tal:review replace="structure comment_form/widgets/review_type"/> |
127 | 142 | <div class="actions" | ||
128 | 143 | tal:content="structure comment_form/actions/field.actions.add/render" /> | ||
129 | 144 | </div> | ||
130 | 145 | </form> | ||
131 | 146 | </div> | ||
132 | 147 | </tal:logged-in> | ||
133 | 148 | |||
134 | 118 | <div class="yui-g"> | 149 | <div class="yui-g"> |
135 | 119 | <div class="yui-u first"> | 150 | <div class="yui-u first"> |
136 | 120 | <div id="source-revisions" | 151 | <div id="source-revisions" |
137 | @@ -159,21 +190,25 @@ | |||
138 | 159 | string:<script id='codereview-script' type='text/javascript'>" /> | 190 | string:<script id='codereview-script' type='text/javascript'>" /> |
139 | 160 | conf = <tal:status-config replace="view/status_config" /> | 191 | conf = <tal:status-config replace="view/status_config" /> |
140 | 161 | <!-- | 192 | <!-- |
142 | 162 | LPS.use('io-base', 'code.codereview', 'code.branchmergeproposal', | 193 | LPS.use('io-base', 'code.codereview', 'code.branchmergeproposal', 'lp.comment', |
143 | 163 | function(Y) { | 194 | function(Y) { |
144 | 164 | 195 | ||
157 | 165 | 196 | Y.on('load', function() { | |
158 | 166 | if(Y.UA.ie) { | 197 | var logged_in = LP.client.links['me'] !== undefined; |
159 | 167 | return; | 198 | |
160 | 168 | } | 199 | if (logged_in) { |
161 | 169 | 200 | var comment = new Y.lp.CodeReviewComment(); | |
162 | 170 | Y.on('domready', function() { | 201 | comment.render(); |
163 | 171 | Y.code.codereview.connect_links(); | 202 | |
164 | 172 | Y.code.branchmergeproposal.connect_status(conf); | 203 | if(Y.UA.ie) { |
165 | 173 | }); | 204 | return; |
166 | 174 | 205 | } | |
167 | 175 | (new Y.codereview.NumberToggle()).render(); | 206 | |
168 | 176 | 207 | Y.code.codereview.connect_links(); | |
169 | 208 | Y.code.branchmergeproposal.connect_status(conf); | ||
170 | 209 | } | ||
171 | 210 | (new Y.codereview.NumberToggle()).render(); | ||
172 | 211 | }, window); | ||
173 | 177 | }); | 212 | }); |
174 | 178 | --> | 213 | --> |
175 | 179 | <tal:script replace="structure string:</script>" /> | 214 | <tal:script replace="structure string:</script>" /> |
176 | 180 | 215 | ||
177 | === modified file 'lib/lp/registry/browser/team.py' | |||
178 | --- lib/lp/registry/browser/team.py 2009-12-01 22:09:05 +0000 | |||
179 | +++ lib/lp/registry/browser/team.py 2009-12-11 15:59:14 +0000 | |||
180 | @@ -901,7 +901,6 @@ | |||
181 | 901 | return None | 901 | return None |
182 | 902 | 902 | ||
183 | 903 | 903 | ||
184 | 904 | |||
185 | 905 | class ProposedTeamMembersEditView(LaunchpadFormView): | 904 | class ProposedTeamMembersEditView(LaunchpadFormView): |
186 | 906 | schema = Interface | 905 | schema = Interface |
187 | 907 | label = 'Proposed team members' | 906 | label = 'Proposed team members' |
188 | @@ -915,7 +914,10 @@ | |||
189 | 915 | status = TeamMembershipStatus.APPROVED | 914 | status = TeamMembershipStatus.APPROVED |
190 | 916 | elif action == "decline": | 915 | elif action == "decline": |
191 | 917 | status = TeamMembershipStatus.DECLINED | 916 | status = TeamMembershipStatus.DECLINED |
193 | 918 | elif action == "hold": | 917 | else: |
194 | 918 | # The action is "hold" or no action was specified for this | ||
195 | 919 | # person, which could happen if the set of proposed members | ||
196 | 920 | # changed while the form was being processed. | ||
197 | 919 | continue | 921 | continue |
198 | 920 | 922 | ||
199 | 921 | self.context.setMembershipData( | 923 | self.context.setMembershipData( |
200 | 922 | 924 | ||
201 | === modified file 'lib/lp/soyuz/doc/publishing.txt' | |||
202 | --- lib/lp/soyuz/doc/publishing.txt 2009-12-04 13:46:43 +0000 | |||
203 | +++ lib/lp/soyuz/doc/publishing.txt 2009-12-11 15:59:14 +0000 | |||
204 | @@ -112,16 +112,34 @@ | |||
205 | 112 | >>> print pub.changes_file_url | 112 | >>> print pub.changes_file_url |
206 | 113 | http://launchpad.dev/ubuntu/+archive/primary/+files/mozilla-firefox_0.9_i386.changes | 113 | http://launchpad.dev/ubuntu/+archive/primary/+files/mozilla-firefox_0.9_i386.changes |
207 | 114 | 114 | ||
208 | 115 | There is also a helper property to determine whether the current release for | ||
209 | 116 | this package in the distroseries is newer than this publishing. Nothing is | ||
210 | 117 | returned if there is no package in the distroseries primary archive with a | ||
211 | 118 | later version. | ||
212 | 119 | |||
213 | 120 | >>> print pub.newer_distroseries_version | ||
214 | 121 | None | ||
215 | 122 | |||
216 | 123 | If we publish iceweasel 1.1 in the same distroseries, then the distroseries | ||
217 | 124 | source package release will be returned. | ||
218 | 125 | |||
219 | 126 | >>> from lp.soyuz.tests.test_publishing import ( | ||
220 | 127 | ... SoyuzTestPublisher) | ||
221 | 128 | >>> test_publisher = SoyuzTestPublisher() | ||
222 | 129 | >>> test_publisher.prepareBreezyAutotest() | ||
223 | 130 | >>> new_version = test_publisher.getPubSource( | ||
224 | 131 | ... distroseries=pub.distroseries, version="1.1", | ||
225 | 132 | ... sourcename='iceweasel') | ||
226 | 133 | |||
227 | 134 | >>> print pub.newer_distroseries_version.title | ||
228 | 135 | "iceweasel" 1.1 source package in The Warty Warthog Release | ||
229 | 136 | |||
230 | 115 | A helper is also included to create a summary of the build statuses for | 137 | A helper is also included to create a summary of the build statuses for |
231 | 116 | the spph's related builds, getStatusSummaryForBuilds(), which just | 138 | the spph's related builds, getStatusSummaryForBuilds(), which just |
232 | 117 | augments the IBuildSet.getStatusSummaryForBuilds() method to include the | 139 | augments the IBuildSet.getStatusSummaryForBuilds() method to include the |
233 | 118 | 'pending' state when builds are fully built but not yet published. | 140 | 'pending' state when builds are fully built but not yet published. |
234 | 119 | 141 | ||
235 | 120 | >>> from lp.soyuz.tests.test_publishing import ( | ||
236 | 121 | ... SoyuzTestPublisher) | ||
237 | 122 | >>> from lp.soyuz.interfaces.build import BuildStatus | 142 | >>> from lp.soyuz.interfaces.build import BuildStatus |
238 | 123 | >>> test_publisher = SoyuzTestPublisher() | ||
239 | 124 | >>> test_publisher.prepareBreezyAutotest() | ||
240 | 125 | >>> spph = test_publisher.getPubSource(architecturehintlist='any') | 143 | >>> spph = test_publisher.getPubSource(architecturehintlist='any') |
241 | 126 | >>> builds = spph.createMissingBuilds() | 144 | >>> builds = spph.createMissingBuilds() |
242 | 127 | >>> for build in builds: | 145 | >>> for build in builds: |
243 | @@ -1214,14 +1232,17 @@ | |||
244 | 1214 | Please note how the result set is ordered by the id of `LibraryFileAlias` | 1232 | Please note how the result set is ordered by the id of `LibraryFileAlias` |
245 | 1215 | (second element of the triple): | 1233 | (second element of the triple): |
246 | 1216 | 1234 | ||
247 | 1235 | >>> file_ids = [file.id for source, file, content in binary_files] | ||
248 | 1236 | >>> file_ids == sorted(file_ids) | ||
249 | 1237 | True | ||
250 | 1217 | >>> for source, file, content in binary_files: | 1238 | >>> for source, file, content in binary_files: |
258 | 1218 | ... print file.id, file.filename | 1239 | ... print file.filename |
259 | 1219 | 40 mozilla-firefox_0.9_i386.deb | 1240 | mozilla-firefox_0.9_i386.deb |
260 | 1220 | 124 foo-bin_666_all.deb | 1241 | foo-bin_666_all.deb |
261 | 1221 | 124 foo-bin_666_all.deb | 1242 | foo-bin_666_all.deb |
262 | 1222 | 130 foo-bin_999_all.deb | 1243 | foo-bin_999_all.deb |
263 | 1223 | 130 foo-bin_999_all.deb | 1244 | foo-bin_999_all.deb |
264 | 1224 | 135 foo-bin_666_all.deb | 1245 | foo-bin_666_all.deb |
265 | 1225 | 1246 | ||
266 | 1226 | getPackageDiffsForSources() is also provided by `IPublishingSet`, it | 1247 | getPackageDiffsForSources() is also provided by `IPublishingSet`, it |
267 | 1227 | allows callsites to retrieve all related `PackageDiff` records based | 1248 | allows callsites to retrieve all related `PackageDiff` records based |
268 | @@ -1694,7 +1715,7 @@ | |||
269 | 1694 | Relevant builds: | 1715 | Relevant builds: |
270 | 1695 | - i386 build of foobar-test 666 in ubuntutest breezy-autotest RELEASE | 1716 | - i386 build of foobar-test 666 in ubuntutest breezy-autotest RELEASE |
271 | 1696 | 1717 | ||
273 | 1697 | Any of the source ids passed into | 1718 | Any of the source ids passed into |
274 | 1698 | getBuildStatusSummariesForSourceIdsAndArchive that do not belong to the | 1719 | getBuildStatusSummariesForSourceIdsAndArchive that do not belong to the |
275 | 1699 | required archive parameter will be ignored: | 1720 | required archive parameter will be ignored: |
276 | 1700 | 1721 | ||
277 | 1701 | 1722 | ||
278 | === modified file 'lib/lp/soyuz/interfaces/publishing.py' | |||
279 | --- lib/lp/soyuz/interfaces/publishing.py 2009-12-07 10:36:21 +0000 | |||
280 | +++ lib/lp/soyuz/interfaces/publishing.py 2009-12-11 15:59:14 +0000 | |||
281 | @@ -570,6 +570,11 @@ | |||
282 | 570 | required=False, readonly=True, | 570 | required=False, readonly=True, |
283 | 571 | )) | 571 | )) |
284 | 572 | 572 | ||
285 | 573 | newer_distroseries_version = Attribute( | ||
286 | 574 | "An `IDistroSeriosSourcePackageRelease` with a newer version of this " | ||
287 | 575 | "package that has been published in the main distribution series, " | ||
288 | 576 | "if one exists, or None.") | ||
289 | 577 | |||
290 | 573 | # Really IBinaryPackagePublishingHistory, see below. | 578 | # Really IBinaryPackagePublishingHistory, see below. |
291 | 574 | @operation_returns_collection_of(Interface) | 579 | @operation_returns_collection_of(Interface) |
292 | 575 | @export_read_operation() | 580 | @export_read_operation() |
293 | 576 | 581 | ||
294 | === modified file 'lib/lp/soyuz/model/publishing.py' | |||
295 | --- lib/lp/soyuz/model/publishing.py 2009-12-07 11:11:28 +0000 | |||
296 | +++ lib/lp/soyuz/model/publishing.py 2009-12-11 15:59:14 +0000 | |||
297 | @@ -18,6 +18,7 @@ | |||
298 | 18 | ] | 18 | ] |
299 | 19 | 19 | ||
300 | 20 | 20 | ||
301 | 21 | import apt_pkg | ||
302 | 21 | from datetime import datetime | 22 | from datetime import datetime |
303 | 22 | import operator | 23 | import operator |
304 | 23 | import os | 24 | import os |
305 | @@ -45,7 +46,6 @@ | |||
306 | 45 | BinaryPackageFile, SourcePackageReleaseFile) | 46 | BinaryPackageFile, SourcePackageReleaseFile) |
307 | 46 | from canonical.launchpad.database.librarian import ( | 47 | from canonical.launchpad.database.librarian import ( |
308 | 47 | LibraryFileAlias, LibraryFileContent) | 48 | LibraryFileAlias, LibraryFileContent) |
309 | 48 | from canonical.launchpad.helpers import getFileType | ||
310 | 49 | from lp.soyuz.model.packagediff import PackageDiff | 49 | from lp.soyuz.model.packagediff import PackageDiff |
311 | 50 | from lp.soyuz.interfaces.archive import ArchivePurpose | 50 | from lp.soyuz.interfaces.archive import ArchivePurpose |
312 | 51 | from lp.soyuz.interfaces.component import IComponentSet | 51 | from lp.soyuz.interfaces.component import IComponentSet |
313 | @@ -64,7 +64,6 @@ | |||
314 | 64 | from canonical.launchpad.webapp.interfaces import ( | 64 | from canonical.launchpad.webapp.interfaces import ( |
315 | 65 | IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR) | 65 | IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR) |
316 | 66 | from lp.registry.interfaces.person import validate_public_person | 66 | from lp.registry.interfaces.person import validate_public_person |
317 | 67 | from lp.registry.interfaces.sourcepackage import SourcePackageFileType | ||
318 | 68 | from canonical.launchpad.webapp.interfaces import NotFoundError | 67 | from canonical.launchpad.webapp.interfaces import NotFoundError |
319 | 69 | 68 | ||
320 | 70 | 69 | ||
321 | @@ -516,6 +515,19 @@ | |||
322 | 516 | return self.sourcepackagerelease.dscsigningkey.owner | 515 | return self.sourcepackagerelease.dscsigningkey.owner |
323 | 517 | return None | 516 | return None |
324 | 518 | 517 | ||
325 | 518 | @property | ||
326 | 519 | def newer_distroseries_version(self): | ||
327 | 520 | """See `ISourcePackagePublishingHistory`.""" | ||
328 | 521 | latest_releases = self.distroseries.getCurrentSourceReleases( | ||
329 | 522 | [self.sourcepackagerelease.sourcepackagename]) | ||
330 | 523 | latest_release = latest_releases.get(self.meta_sourcepackage, None) | ||
331 | 524 | |||
332 | 525 | if latest_release is not None and apt_pkg.VersionCompare( | ||
333 | 526 | latest_release.version, self.source_package_version) > 0: | ||
334 | 527 | return latest_release | ||
335 | 528 | else: | ||
336 | 529 | return None | ||
337 | 530 | |||
338 | 519 | def getPublishedBinaries(self): | 531 | def getPublishedBinaries(self): |
339 | 520 | """See `ISourcePackagePublishingHistory`.""" | 532 | """See `ISourcePackagePublishingHistory`.""" |
340 | 521 | publishing_set = getUtility(IPublishingSet) | 533 | publishing_set = getUtility(IPublishingSet) |
341 | @@ -1465,14 +1477,6 @@ | |||
342 | 1465 | 1477 | ||
343 | 1466 | def getFilesForSources(self, one_or_more_source_publications): | 1478 | def getFilesForSources(self, one_or_more_source_publications): |
344 | 1467 | """See `IPublishingSet`.""" | 1479 | """See `IPublishingSet`.""" |
345 | 1468 | # Import Build and BinaryPackageRelease locally to avoid circular | ||
346 | 1469 | # imports, since that Build already imports | ||
347 | 1470 | # SourcePackagePublishingHistory and BinaryPackageRelease imports | ||
348 | 1471 | # Build. | ||
349 | 1472 | from lp.soyuz.model.binarypackagerelease import ( | ||
350 | 1473 | BinaryPackageRelease) | ||
351 | 1474 | from lp.soyuz.model.build import Build | ||
352 | 1475 | |||
353 | 1476 | source_publication_ids = self._extractIDs( | 1480 | source_publication_ids = self._extractIDs( |
354 | 1477 | one_or_more_source_publications) | 1481 | one_or_more_source_publications) |
355 | 1478 | 1482 | ||
356 | @@ -1497,12 +1501,9 @@ | |||
357 | 1497 | def getBinaryPublicationsForSources( | 1501 | def getBinaryPublicationsForSources( |
358 | 1498 | self, one_or_more_source_publications): | 1502 | self, one_or_more_source_publications): |
359 | 1499 | """See `IPublishingSet`.""" | 1503 | """See `IPublishingSet`.""" |
366 | 1500 | # Import Build, BinaryPackageRelease and DistroArchSeries locally | 1504 | # Import Buildand DistroArchSeries locally to avoid circular imports, |
367 | 1501 | # to avoid circular imports, since Build uses | 1505 | # since Build uses SourcePackagePublishingHistory and DistroArchSeries |
368 | 1502 | # SourcePackagePublishingHistory, BinaryPackageRelease uses Build | 1506 | # uses BinaryPackagePublishingHistory. |
363 | 1503 | # and DistroArchSeries uses BinaryPackagePublishingHistory. | ||
364 | 1504 | from lp.soyuz.model.binarypackagerelease import ( | ||
365 | 1505 | BinaryPackageRelease) | ||
369 | 1506 | from lp.soyuz.model.distroarchseries import ( | 1507 | from lp.soyuz.model.distroarchseries import ( |
370 | 1507 | DistroArchSeries) | 1508 | DistroArchSeries) |
371 | 1508 | 1509 | ||
372 | 1509 | 1510 | ||
373 | === modified file 'lib/lp/soyuz/stories/ppa/xx-copy-packages.txt' | |||
374 | --- lib/lp/soyuz/stories/ppa/xx-copy-packages.txt 2009-12-07 14:47:54 +0000 | |||
375 | +++ lib/lp/soyuz/stories/ppa/xx-copy-packages.txt 2009-12-11 15:59:14 +0000 | |||
376 | @@ -243,7 +243,8 @@ | |||
377 | 243 | 243 | ||
378 | 244 | James uses the link in the copy summary to go straight to the target | 244 | James uses the link in the copy summary to go straight to the target |
379 | 245 | PPA, his own. There he can see the just copied package as PENDING and | 245 | PPA, his own. There he can see the just copied package as PENDING and |
381 | 246 | also marked as pending build for i386. | 246 | also marked as pending build for i386. Note, he is also informed that |
382 | 247 | there is actually a newer version already available in hoary. | ||
383 | 247 | 248 | ||
384 | 248 | >>> jblack_browser.getLink('PPA for James Blackwell').click() | 249 | >>> jblack_browser.getLink('PPA for James Blackwell').click() |
385 | 249 | >>> print jblack_browser.title | 250 | >>> print jblack_browser.title |
386 | @@ -252,7 +253,7 @@ | |||
387 | 252 | >>> print_ppa_packages(jblack_browser.contents) | 253 | >>> print_ppa_packages(jblack_browser.contents) |
388 | 253 | Source Published Status Series Section Build | 254 | Source Published Status Series Section Build |
389 | 254 | Status | 255 | Status |
391 | 255 | pmount - 0.1-1 Pending Hoary Editors i386 | 256 | pmount - 0.1-1 (Newer...) Pending Hoary Editors i386 |
392 | 256 | 257 | ||
393 | 257 | Expanding the details area, James can see that the source copied is | 258 | Expanding the details area, James can see that the source copied is |
394 | 258 | indeed the same by checking the changelog, also that the binaries | 259 | indeed the same by checking the changelog, also that the binaries |
395 | @@ -337,7 +338,7 @@ | |||
396 | 337 | >>> print_ppa_packages(jblack_browser.contents) | 338 | >>> print_ppa_packages(jblack_browser.contents) |
397 | 338 | Source Published Status Series Section Build | 339 | Source Published Status Series Section Build |
398 | 339 | Status | 340 | Status |
400 | 340 | pmount - 0.1-1 Pending Hoary Editors i386 | 341 | pmount - 0.1-1 (Newer...) Pending Hoary Editors i386 |
401 | 341 | 342 | ||
402 | 342 | Then selects pmount in hoary. | 343 | Then selects pmount in hoary. |
403 | 343 | 344 | ||
404 | @@ -504,7 +505,7 @@ | |||
405 | 504 | Source Published Status Series Section Build | 505 | Source Published Status Series Section Build |
406 | 505 | Status | 506 | Status |
407 | 506 | pmount - 0.1-1 Pending Grumpy Editors | 507 | pmount - 0.1-1 Pending Grumpy Editors |
409 | 507 | pmount - 0.1-1 Pending Hoary Editors | 508 | pmount - 0.1-1 (Newer...) Pending Hoary Editors |
410 | 508 | 509 | ||
411 | 509 | After the binary package go from PENDING->PUBLISHED, the page reflects the | 510 | After the binary package go from PENDING->PUBLISHED, the page reflects the |
412 | 510 | changes: | 511 | changes: |
413 | @@ -521,7 +522,7 @@ | |||
414 | 521 | Source Published Status Series Section Build | 522 | Source Published Status Series Section Build |
415 | 522 | Status | 523 | Status |
416 | 523 | pmount - 0.1-1 Pending Grumpy Editors | 524 | pmount - 0.1-1 Pending Grumpy Editors |
418 | 524 | pmount - 0.1-1 Pending Hoary Editors | 525 | pmount - 0.1-1 (Newer...) Pending Hoary Editors |
419 | 525 | 526 | ||
420 | 526 | If James performs exactly the same copy procedure again, a message | 527 | If James performs exactly the same copy procedure again, a message |
421 | 527 | stating that all packages involved were already copied to the | 528 | stating that all packages involved were already copied to the |
422 | @@ -565,7 +566,7 @@ | |||
423 | 565 | Source Published Status Series Section Build | 566 | Source Published Status Series Section Build |
424 | 566 | Status | 567 | Status |
425 | 567 | pmount - 0.1-1 Pending Grumpy Editors | 568 | pmount - 0.1-1 Pending Grumpy Editors |
427 | 568 | pmount - 0.1-1 Deleted Hoary Editors | 569 | pmount - 0.1-1 (Newer...) Deleted Hoary Editors |
428 | 569 | 570 | ||
429 | 570 | In the minute after James had deleted the package, he discovered that | 571 | In the minute after James had deleted the package, he discovered that |
430 | 571 | 'pmount' might work correctly in warty. | 572 | 'pmount' might work correctly in warty. |
431 | @@ -593,7 +594,7 @@ | |||
432 | 593 | Source Published Status Series Section Build | 594 | Source Published Status Series Section Build |
433 | 594 | Status | 595 | Status |
434 | 595 | pmount - 0.1-1 Pending Grumpy Editors | 596 | pmount - 0.1-1 Pending Grumpy Editors |
436 | 596 | pmount - 0.1-1 Deleted Hoary Editors | 597 | pmount - 0.1-1 (Newer...) Deleted Hoary Editors |
437 | 597 | 598 | ||
438 | 598 | James mistakenly requests the copy without including the binaries | 599 | James mistakenly requests the copy without including the binaries |
439 | 599 | resulting from the hoary build, which are still published in grumpy. | 600 | resulting from the hoary build, which are still published in grumpy. |
440 | @@ -644,7 +645,7 @@ | |||
441 | 644 | Status | 645 | Status |
442 | 645 | pmount - 0.1-1 Pending Warty Editors | 646 | pmount - 0.1-1 Pending Warty Editors |
443 | 646 | pmount - 0.1-1 Pending Grumpy Editors | 647 | pmount - 0.1-1 Pending Grumpy Editors |
445 | 647 | pmount - 0.1-1 Deleted Hoary Editors | 648 | pmount - 0.1-1 (Newer...) Deleted Hoary Editors |
446 | 648 | 649 | ||
447 | 649 | 650 | ||
448 | 650 | === Copying packages to other PPAs you participate === | 651 | === Copying packages to other PPAs you participate === |
449 | @@ -744,7 +745,7 @@ | |||
450 | 744 | Source Uploader Published Status Series Section Build | 745 | Source Uploader Published Status Series Section Build |
451 | 745 | Status | 746 | Status |
452 | 746 | iceweasel...(...) no signer Pending Hoary Editors | 747 | iceweasel...(...) no signer Pending Hoary Editors |
454 | 747 | pmount - 0.1-1 no signer Pending Hoary Editors | 748 | pmount...(...) no signer Pending Hoary Editors |
455 | 748 | 749 | ||
456 | 749 | James just gives a quick look to the details section of each copied | 750 | James just gives a quick look to the details section of each copied |
457 | 750 | sources to ensure the binaries are really there. | 751 | sources to ensure the binaries are really there. |
458 | @@ -838,7 +839,7 @@ | |||
459 | 838 | Status | 839 | Status |
460 | 839 | pmount - 0.1-1 Pending Warty Editors | 840 | pmount - 0.1-1 Pending Warty Editors |
461 | 840 | pmount - 0.1-1 Pending Grumpy Editors | 841 | pmount - 0.1-1 Pending Grumpy Editors |
463 | 841 | pmount - 0.1-1 Deleted Hoary Editors | 842 | pmount - 0.1-1 (Newer...) Deleted Hoary Editors |
464 | 842 | 843 | ||
465 | 843 | >>> jblack_pub_ids = getPPAPubIDsFor('jblack') | 844 | >>> jblack_pub_ids = getPPAPubIDsFor('jblack') |
466 | 844 | 845 | ||
467 | @@ -924,10 +925,10 @@ | |||
468 | 924 | >>> print_ppa_packages(jblack_browser.contents) | 925 | >>> print_ppa_packages(jblack_browser.contents) |
469 | 925 | Source Published Status Series Section Build | 926 | Source Published Status Series Section Build |
470 | 926 | Status | 927 | Status |
472 | 927 | pmount - 0.1-1 Pending Hoary Editors | 928 | pmount - 0.1-1 (Newer...) Pending Hoary Editors |
473 | 928 | pmount - 0.1-1 Pending Warty Editors | 929 | pmount - 0.1-1 Pending Warty Editors |
474 | 929 | pmount - 0.1-1 Pending Grumpy Editors | 930 | pmount - 0.1-1 Pending Grumpy Editors |
476 | 930 | pmount - 0.1-1 Deleted Hoary Editors | 931 | pmount - 0.1-1 (Newer...) Deleted Hoary Editors |
477 | 931 | 932 | ||
478 | 932 | James is not yet satisfied and to create some fun we will publish | 933 | James is not yet satisfied and to create some fun we will publish |
479 | 933 | different version of foo_1.0 in Mark's and Celso's PPAs and a foo_2.0 | 934 | different version of foo_1.0 in Mark's and Celso's PPAs and a foo_2.0 |
480 | @@ -1064,7 +1065,7 @@ | |||
481 | 1064 | Status | 1065 | Status |
482 | 1065 | foo - 2.0 (changesfile) Pending Hoary Base i386 | 1066 | foo - 2.0 (changesfile) Pending Hoary Base i386 |
483 | 1066 | foo - 1.1 (changesfile) Pending Warty Base | 1067 | foo - 1.1 (changesfile) Pending Warty Base |
485 | 1067 | pmount - 0.1-1 Pending Hoary Editors | 1068 | pmount - 0.1-1 (Newer...) Pending Hoary Editors |
486 | 1068 | pmount - 0.1-1 Pending Warty Editors | 1069 | pmount - 0.1-1 Pending Warty Editors |
487 | 1069 | pmount - 0.1-1 Pending Grumpy Editors | 1070 | pmount - 0.1-1 Pending Grumpy Editors |
488 | 1070 | 1071 | ||
489 | 1071 | 1072 | ||
490 | === modified file 'lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt' | |||
491 | --- lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt 2009-11-07 07:46:54 +0000 | |||
492 | +++ lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt 2009-12-11 15:59:14 +0000 | |||
493 | @@ -354,6 +354,36 @@ | |||
494 | 354 | iceweasel 1.0 no signer (2007-07-09) | 354 | iceweasel 1.0 no signer (2007-07-09) |
495 | 355 | pmount 0.1-1 no signer (2007-07-09) | 355 | pmount 0.1-1 no signer (2007-07-09) |
496 | 356 | 356 | ||
497 | 357 | If a ppa package has been superseded by an package in the primary | ||
498 | 358 | archive for the distroseries, this will be indicated with a link | ||
499 | 359 | to the newer version. | ||
500 | 360 | |||
501 | 361 | # Publish a newer version of iceweasel in hoary. | ||
502 | 362 | >>> login('admin@canonical.com') | ||
503 | 363 | >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher | ||
504 | 364 | >>> test_publisher = SoyuzTestPublisher() | ||
505 | 365 | >>> warty = getUtility(IDistributionSet)['ubuntu']['warty'] | ||
506 | 366 | >>> test_publisher.prepareBreezyAutotest() | ||
507 | 367 | >>> new_version = test_publisher.getPubSource( | ||
508 | 368 | ... distroseries=warty, version="1.1", sourcename='iceweasel') | ||
509 | 369 | >>> import transaction | ||
510 | 370 | >>> transaction.commit() | ||
511 | 371 | >>> logout() | ||
512 | 372 | |||
513 | 373 | >>> anon_browser.reload() | ||
514 | 374 | >>> print_archive_package_rows(anon_browser.contents) | ||
515 | 375 | Package Version Uploaded by | ||
516 | 376 | cdrkit 1.0 no signer (2007-07-09) | ||
517 | 377 | commercialpackage 1.0-1 no signer | ||
518 | 378 | iceweasel 1.0 (Newer version available) | ||
519 | 379 | no signer (2007-07-09) | ||
520 | 380 | pmount 0.1-1 no signer (2007-07-09) | ||
521 | 381 | |||
522 | 382 | The link itself will point to the newer version in the distro series. | ||
523 | 383 | |||
524 | 384 | >>> print anon_browser.getLink('Newer version').url | ||
525 | 385 | http://launchpad.dev/ubuntu/warty/+source/iceweasel/1.1 | ||
526 | 386 | |||
527 | 357 | A Latest updates portlet is included on the index page indicating the | 387 | A Latest updates portlet is included on the index page indicating the |
528 | 358 | latest published sources with their states. | 388 | latest published sources with their states. |
529 | 359 | 389 | ||
530 | @@ -417,7 +447,8 @@ | |||
531 | 417 | Package Version Uploaded by | 447 | Package Version Uploaded by |
532 | 418 | cdrkit 1.0 no signer (2007-07-09) | 448 | cdrkit 1.0 no signer (2007-07-09) |
533 | 419 | commercialpackage 1.0-1 no signer | 449 | commercialpackage 1.0-1 no signer |
535 | 420 | iceweasel 1.0 no signer (2007-07-09) | 450 | iceweasel 1.0 (Newer version available) |
536 | 451 | no signer (2007-07-09) | ||
537 | 421 | pmount 0.1-1 no signer (2007-07-09) | 452 | pmount 0.1-1 no signer (2007-07-09) |
538 | 422 | 453 | ||
539 | 423 | If the packages are filtered by a particular series, then the result | 454 | If the packages are filtered by a particular series, then the result |
540 | 424 | 455 | ||
541 | === modified file 'lib/lp/soyuz/templates/archive-index.pt' | |||
542 | --- lib/lp/soyuz/templates/archive-index.pt 2009-11-27 20:47:00 +0000 | |||
543 | +++ lib/lp/soyuz/templates/archive-index.pt 2009-12-11 15:59:14 +0000 | |||
544 | @@ -252,17 +252,27 @@ | |||
545 | 252 | </tr> | 252 | </tr> |
546 | 253 | </thead> | 253 | </thead> |
547 | 254 | <tbody> | 254 | <tbody> |
549 | 255 | <tr tal:repeat="publishing batch"> | 255 | <tal:publishing repeat="publishing batch"> |
550 | 256 | <tr tal:define="newer_version publishing/newer_distroseries_version" | ||
551 | 257 | tal:attributes="class python: newer_version and | ||
552 | 258 | 'superseded' or ''"> | ||
553 | 256 | <td> | 259 | <td> |
554 | 257 | <img src="/@@/package-source" /> | 260 | <img src="/@@/package-source" /> |
555 | 258 | <tal:source_name replace="publishing/sourcepackagerelease/name"> | 261 | <tal:source_name replace="publishing/sourcepackagerelease/name"> |
556 | 259 | foo | 262 | foo |
557 | 260 | </tal:source_name> | 263 | </tal:source_name> |
558 | 261 | </td> | 264 | </td> |
560 | 262 | <td tal:define=" | 265 | <td> |
561 | 266 | <tal:version define=" | ||
562 | 263 | version_name publishing/meta_distroseriessourcepackagerelease/version;" | 267 | version_name publishing/meta_distroseriessourcepackagerelease/version;" |
565 | 264 | tal:content="version_name"> | 268 | content="version_name"> |
566 | 265 | 2.0.39</td> | 269 | 2.0.39 |
567 | 270 | </tal:version> | ||
568 | 271 | <tal:newer_version condition="newer_version"> | ||
569 | 272 | (<a tal:attributes="href newer_version/fmt:url">Newer version</a> | ||
570 | 273 | available) | ||
571 | 274 | </tal:newer_version> | ||
572 | 275 | </td> | ||
573 | 266 | <td tal:define="spr publishing/sourcepackagerelease; | 276 | <td tal:define="spr publishing/sourcepackagerelease; |
574 | 267 | signer spr/dscsigningkey/owner/fmt:link|string:no signer"> | 277 | signer spr/dscsigningkey/owner/fmt:link|string:no signer"> |
575 | 268 | <span tal:replace="structure signer">Joe Bloggs</span> | 278 | <span tal:replace="structure signer">Joe Bloggs</span> |
576 | @@ -274,6 +284,7 @@ | |||
577 | 274 | </tal:date_published> | 284 | </tal:date_published> |
578 | 275 | </td> | 285 | </td> |
579 | 276 | </tr> | 286 | </tr> |
580 | 287 | </tal:publishing> | ||
581 | 277 | </tbody> | 288 | </tbody> |
582 | 278 | </table> | 289 | </table> |
583 | 279 | 290 | ||
584 | 280 | 291 | ||
585 | === modified file 'lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt' | |||
586 | --- lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt 2009-07-17 17:59:07 +0000 | |||
587 | +++ lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt 2009-12-11 15:59:14 +0000 | |||
588 | @@ -2,9 +2,11 @@ | |||
589 | 2 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 2 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
590 | 3 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 3 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
591 | 4 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 4 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
593 | 5 | omit-tag=""> | 5 | omit-tag="" |
594 | 6 | define="newer_version context/newer_distroseries_version"> | ||
595 | 6 | 7 | ||
597 | 7 | <tr class="archive_package_row"> | 8 | <tr tal:attributes="class python: ('archive_package_row ' + ( |
598 | 9 | newer_version and 'superseded' or ''))"> | ||
599 | 8 | <td style="white-space: nowrap"> | 10 | <td style="white-space: nowrap"> |
600 | 9 | <input | 11 | <input |
601 | 10 | name="field.selected_sources" type="checkbox" | 12 | name="field.selected_sources" type="checkbox" |
602 | @@ -21,6 +23,11 @@ | |||
603 | 21 | foo - 1.0 | 23 | foo - 1.0 |
604 | 22 | </tal:source_name> | 24 | </tal:source_name> |
605 | 23 | </a> | 25 | </a> |
606 | 26 | |||
607 | 27 | <tal:newer_version tal:condition="newer_version"> | ||
608 | 28 | (<a tal:attributes="href newer_version/fmt:url">Newer version</a> | ||
609 | 29 | available) | ||
610 | 30 | </tal:newer_version> | ||
611 | 24 | </td> | 31 | </td> |
612 | 25 | <td> | 32 | <td> |
613 | 26 | <tal:view_changesfile | 33 | <tal:view_changesfile |
= Summary =
Ensures that if a package in a PPA has been superseded by later version of the same package in the distroseries primary/partner archive, then it will be indicated in the PPA UI.
== Proposed fix ==
Add ISourcePackageP ublishingHistor y.newer_ distroseries_ version and use this in the template to add a link to the newer version as well as highlight the row subtly with a gray background.
== Pre-implementation notes ==
See comments on bug 211008 (I did some UI pre-imp there). Note, I ended up removing the icon altogether as it was not subtle at all.
== Implementation details ==
== Tests ==
bin/test -vv -t doc/publishing.txt -t xx-ubuntu-ppas.txt
== Demo and Q/A ==
To demo: /launchpad. dev/~cprov/ +archive/ ppa pastebin. ubuntu. com/338780/ /launchpad. dev/~cprov/ +archive/ ppa
1. visit https:/
2. In a `bin/iharness` run the following script:
http://
3. Reload https:/
4. Click on 'View package details' and see the same change there also.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: soyuz/stories/ ppa/xx- ubuntu- ppas.txt soyuz/model/ publishing. py soyuz/doc/ publishing. txt soyuz/templates /sourcepackagep ublishinghistor y-listing- archive- detailed. pt soyuz/interface s/publishing. py /launchpad/ icing/style- 3-0.css soyuz/templates /archive- index.pt
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/canonical
lib/lp/
== Pylint notices ==
lib/lp/ soyuz/interface s/publishing. py fields' (No module named restful) declarations' (No module named restful)
33: [F0401] Unable to import 'lazr.enum' (No module named enum)
40: [F0401] Unable to import 'lazr.restful.
41: [F0401] Unable to import 'lazr.restful.