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 | background-repeat: no-repeat; |
6 | background-position:right center; |
7 | } |
8 | +table#packages_list tr.superseded { |
9 | + background-color: #eee; |
10 | +} |
11 | /* The following could be generalised for use to the following selector: |
12 | * .side .portlet li.nth-child(odd) |
13 | * if needed. */ |
14 | |
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 | }, |
20 | renderUI: function() { |
21 | CodeReviewComment.superclass.renderUI.apply(this); |
22 | - Y.one('#inline-add-comment').setStyle('display', 'block'); |
23 | }, |
24 | /** |
25 | * Implementation of Widget.bindUI: Bind events to methods. |
26 | |
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 | |
32 | class MyDropWidget(DropdownWidget): |
33 | "Override the default no-value display name to -Select-." |
34 | - _messageNoValue = '-Select-' |
35 | + _messageNoValue = 'Comment only' |
36 | |
37 | schema = IEditCodeReviewComment |
38 | |
39 | @@ -251,10 +251,11 @@ |
40 | @action('Save Comment', name='add') |
41 | def add_action(self, action, data): |
42 | """Create the comment...""" |
43 | + vote = data.get('vote') |
44 | + review_type = data.get('review_type') |
45 | comment = self.branch_merge_proposal.createComment( |
46 | self.user, subject=None, content=data['comment'], |
47 | - parent=self.reply_to, vote=data['vote'], |
48 | - review_type=data['review_type']) |
49 | + parent=self.reply_to, vote=vote, review_type=review_type) |
50 | |
51 | @property |
52 | def next_url(self): |
53 | |
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 | #commit-message, #edit-commit-message { |
59 | margin: 1em 0 0 0; |
60 | } |
61 | + #add-comment-form { |
62 | + max-width: 60em; |
63 | + padding-bottom: 3em; |
64 | + } |
65 | + #add-comment-form textarea{ |
66 | + width: 100%; |
67 | + max-width: inherit; |
68 | + } |
69 | + #add-comment-form .actions { |
70 | + float: right; |
71 | + margin: 0 -0.5em; |
72 | + } |
73 | + #add-comment-review-fields { |
74 | + margin-top: 1em; |
75 | + } |
76 | + #add-comment-review-fields div { |
77 | + display: inline; |
78 | + } |
79 | /* A page-specific fix for inline text are editing to line up box. */ |
80 | #edit-commit-message .yui-ieditor-input { top: 0; } |
81 | </style> |
82 | @@ -92,6 +110,12 @@ |
83 | </div> |
84 | |
85 | <div class="yui-g"> |
86 | + <tal:not-logged-in condition="not: view/user"> |
87 | + <div align="center" id="add-comment-login-first"> |
88 | + To post a comment you must <a href="+login">log in</a>. |
89 | + </div> |
90 | + </tal:not-logged-in> |
91 | + |
92 | <div tal:define="link menu/add_comment" |
93 | tal:condition="link/enabled" |
94 | tal:content="structure link/render"> |
95 | @@ -101,20 +125,27 @@ |
96 | <div id="conversation" |
97 | tal:content="structure view/conversation/@@+render"/> |
98 | </div> |
99 | - <!-- Hide inline commenting if YUI isn't used. --> |
100 | - <div id="inline-add-comment" style="display: none"> |
101 | - <tal:comment replace="structure context/@@+comment/++form++" /> |
102 | - <div class="actions" id="launchpad-form-actions"> |
103 | - <input type="submit" id="field.actions.add" name="field.actions.add" value="Save Comment" class="button" /> |
104 | - </div> |
105 | - </div> |
106 | - |
107 | - <script type="text/javascript"> |
108 | - LPS.use('lp.comment', function(Y) { |
109 | - var comment = new Y.lp.CodeReviewComment(); |
110 | - comment.render(); |
111 | - }) |
112 | - </script> |
113 | + |
114 | + <tal:logged-in condition="view/user"> |
115 | + <div tal:define="comment_form nocall:context/@@+comment; |
116 | + dummy comment_form/initialize"> |
117 | + <h2 id="add-comment">Add comment</h2> |
118 | + <form action="+comment" |
119 | + method="post" |
120 | + enctype="multipart/form-data" |
121 | + accept-charset="UTF-8" |
122 | + id="add-comment-form"> |
123 | + <tal:comment-input replace="structure comment_form/widgets/comment"/> |
124 | + <div id="add-comment-review-fields"> |
125 | + Review: <tal:review replace="structure comment_form/widgets/vote"/> |
126 | + Review type: <tal:review replace="structure comment_form/widgets/review_type"/> |
127 | + <div class="actions" |
128 | + tal:content="structure comment_form/actions/field.actions.add/render" /> |
129 | + </div> |
130 | + </form> |
131 | + </div> |
132 | + </tal:logged-in> |
133 | + |
134 | <div class="yui-g"> |
135 | <div class="yui-u first"> |
136 | <div id="source-revisions" |
137 | @@ -159,21 +190,25 @@ |
138 | string:<script id='codereview-script' type='text/javascript'>" /> |
139 | conf = <tal:status-config replace="view/status_config" /> |
140 | <!-- |
141 | - LPS.use('io-base', 'code.codereview', 'code.branchmergeproposal', |
142 | + LPS.use('io-base', 'code.codereview', 'code.branchmergeproposal', 'lp.comment', |
143 | function(Y) { |
144 | |
145 | - |
146 | - if(Y.UA.ie) { |
147 | - return; |
148 | - } |
149 | - |
150 | - Y.on('domready', function() { |
151 | - Y.code.codereview.connect_links(); |
152 | - Y.code.branchmergeproposal.connect_status(conf); |
153 | - }); |
154 | - |
155 | - (new Y.codereview.NumberToggle()).render(); |
156 | - |
157 | + Y.on('load', function() { |
158 | + var logged_in = LP.client.links['me'] !== undefined; |
159 | + |
160 | + if (logged_in) { |
161 | + var comment = new Y.lp.CodeReviewComment(); |
162 | + comment.render(); |
163 | + |
164 | + if(Y.UA.ie) { |
165 | + return; |
166 | + } |
167 | + |
168 | + Y.code.codereview.connect_links(); |
169 | + Y.code.branchmergeproposal.connect_status(conf); |
170 | + } |
171 | + (new Y.codereview.NumberToggle()).render(); |
172 | + }, window); |
173 | }); |
174 | --> |
175 | <tal:script replace="structure string:</script>" /> |
176 | |
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 | return None |
182 | |
183 | |
184 | - |
185 | class ProposedTeamMembersEditView(LaunchpadFormView): |
186 | schema = Interface |
187 | label = 'Proposed team members' |
188 | @@ -915,7 +914,10 @@ |
189 | status = TeamMembershipStatus.APPROVED |
190 | elif action == "decline": |
191 | status = TeamMembershipStatus.DECLINED |
192 | - elif action == "hold": |
193 | + else: |
194 | + # The action is "hold" or no action was specified for this |
195 | + # person, which could happen if the set of proposed members |
196 | + # changed while the form was being processed. |
197 | continue |
198 | |
199 | self.context.setMembershipData( |
200 | |
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 | >>> print pub.changes_file_url |
206 | http://launchpad.dev/ubuntu/+archive/primary/+files/mozilla-firefox_0.9_i386.changes |
207 | |
208 | +There is also a helper property to determine whether the current release for |
209 | +this package in the distroseries is newer than this publishing. Nothing is |
210 | +returned if there is no package in the distroseries primary archive with a |
211 | +later version. |
212 | + |
213 | + >>> print pub.newer_distroseries_version |
214 | + None |
215 | + |
216 | +If we publish iceweasel 1.1 in the same distroseries, then the distroseries |
217 | +source package release will be returned. |
218 | + |
219 | + >>> from lp.soyuz.tests.test_publishing import ( |
220 | + ... SoyuzTestPublisher) |
221 | + >>> test_publisher = SoyuzTestPublisher() |
222 | + >>> test_publisher.prepareBreezyAutotest() |
223 | + >>> new_version = test_publisher.getPubSource( |
224 | + ... distroseries=pub.distroseries, version="1.1", |
225 | + ... sourcename='iceweasel') |
226 | + |
227 | + >>> print pub.newer_distroseries_version.title |
228 | + "iceweasel" 1.1 source package in The Warty Warthog Release |
229 | + |
230 | A helper is also included to create a summary of the build statuses for |
231 | the spph's related builds, getStatusSummaryForBuilds(), which just |
232 | augments the IBuildSet.getStatusSummaryForBuilds() method to include the |
233 | 'pending' state when builds are fully built but not yet published. |
234 | |
235 | - >>> from lp.soyuz.tests.test_publishing import ( |
236 | - ... SoyuzTestPublisher) |
237 | >>> from lp.soyuz.interfaces.build import BuildStatus |
238 | - >>> test_publisher = SoyuzTestPublisher() |
239 | - >>> test_publisher.prepareBreezyAutotest() |
240 | >>> spph = test_publisher.getPubSource(architecturehintlist='any') |
241 | >>> builds = spph.createMissingBuilds() |
242 | >>> for build in builds: |
243 | @@ -1214,14 +1232,17 @@ |
244 | Please note how the result set is ordered by the id of `LibraryFileAlias` |
245 | (second element of the triple): |
246 | |
247 | + >>> file_ids = [file.id for source, file, content in binary_files] |
248 | + >>> file_ids == sorted(file_ids) |
249 | + True |
250 | >>> for source, file, content in binary_files: |
251 | - ... print file.id, file.filename |
252 | - 40 mozilla-firefox_0.9_i386.deb |
253 | - 124 foo-bin_666_all.deb |
254 | - 124 foo-bin_666_all.deb |
255 | - 130 foo-bin_999_all.deb |
256 | - 130 foo-bin_999_all.deb |
257 | - 135 foo-bin_666_all.deb |
258 | + ... print file.filename |
259 | + mozilla-firefox_0.9_i386.deb |
260 | + foo-bin_666_all.deb |
261 | + foo-bin_666_all.deb |
262 | + foo-bin_999_all.deb |
263 | + foo-bin_999_all.deb |
264 | + foo-bin_666_all.deb |
265 | |
266 | getPackageDiffsForSources() is also provided by `IPublishingSet`, it |
267 | allows callsites to retrieve all related `PackageDiff` records based |
268 | @@ -1694,7 +1715,7 @@ |
269 | Relevant builds: |
270 | - i386 build of foobar-test 666 in ubuntutest breezy-autotest RELEASE |
271 | |
272 | -Any of the source ids passed into |
273 | +Any of the source ids passed into |
274 | getBuildStatusSummariesForSourceIdsAndArchive that do not belong to the |
275 | required archive parameter will be ignored: |
276 | |
277 | |
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 | required=False, readonly=True, |
283 | )) |
284 | |
285 | + newer_distroseries_version = Attribute( |
286 | + "An `IDistroSeriosSourcePackageRelease` with a newer version of this " |
287 | + "package that has been published in the main distribution series, " |
288 | + "if one exists, or None.") |
289 | + |
290 | # Really IBinaryPackagePublishingHistory, see below. |
291 | @operation_returns_collection_of(Interface) |
292 | @export_read_operation() |
293 | |
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 | ] |
299 | |
300 | |
301 | +import apt_pkg |
302 | from datetime import datetime |
303 | import operator |
304 | import os |
305 | @@ -45,7 +46,6 @@ |
306 | BinaryPackageFile, SourcePackageReleaseFile) |
307 | from canonical.launchpad.database.librarian import ( |
308 | LibraryFileAlias, LibraryFileContent) |
309 | -from canonical.launchpad.helpers import getFileType |
310 | from lp.soyuz.model.packagediff import PackageDiff |
311 | from lp.soyuz.interfaces.archive import ArchivePurpose |
312 | from lp.soyuz.interfaces.component import IComponentSet |
313 | @@ -64,7 +64,6 @@ |
314 | from canonical.launchpad.webapp.interfaces import ( |
315 | IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR) |
316 | from lp.registry.interfaces.person import validate_public_person |
317 | -from lp.registry.interfaces.sourcepackage import SourcePackageFileType |
318 | from canonical.launchpad.webapp.interfaces import NotFoundError |
319 | |
320 | |
321 | @@ -516,6 +515,19 @@ |
322 | return self.sourcepackagerelease.dscsigningkey.owner |
323 | return None |
324 | |
325 | + @property |
326 | + def newer_distroseries_version(self): |
327 | + """See `ISourcePackagePublishingHistory`.""" |
328 | + latest_releases = self.distroseries.getCurrentSourceReleases( |
329 | + [self.sourcepackagerelease.sourcepackagename]) |
330 | + latest_release = latest_releases.get(self.meta_sourcepackage, None) |
331 | + |
332 | + if latest_release is not None and apt_pkg.VersionCompare( |
333 | + latest_release.version, self.source_package_version) > 0: |
334 | + return latest_release |
335 | + else: |
336 | + return None |
337 | + |
338 | def getPublishedBinaries(self): |
339 | """See `ISourcePackagePublishingHistory`.""" |
340 | publishing_set = getUtility(IPublishingSet) |
341 | @@ -1465,14 +1477,6 @@ |
342 | |
343 | def getFilesForSources(self, one_or_more_source_publications): |
344 | """See `IPublishingSet`.""" |
345 | - # Import Build and BinaryPackageRelease locally to avoid circular |
346 | - # imports, since that Build already imports |
347 | - # SourcePackagePublishingHistory and BinaryPackageRelease imports |
348 | - # Build. |
349 | - from lp.soyuz.model.binarypackagerelease import ( |
350 | - BinaryPackageRelease) |
351 | - from lp.soyuz.model.build import Build |
352 | - |
353 | source_publication_ids = self._extractIDs( |
354 | one_or_more_source_publications) |
355 | |
356 | @@ -1497,12 +1501,9 @@ |
357 | def getBinaryPublicationsForSources( |
358 | self, one_or_more_source_publications): |
359 | """See `IPublishingSet`.""" |
360 | - # Import Build, BinaryPackageRelease and DistroArchSeries locally |
361 | - # to avoid circular imports, since Build uses |
362 | - # SourcePackagePublishingHistory, BinaryPackageRelease uses Build |
363 | - # and DistroArchSeries uses BinaryPackagePublishingHistory. |
364 | - from lp.soyuz.model.binarypackagerelease import ( |
365 | - BinaryPackageRelease) |
366 | + # Import Buildand DistroArchSeries locally to avoid circular imports, |
367 | + # since Build uses SourcePackagePublishingHistory and DistroArchSeries |
368 | + # uses BinaryPackagePublishingHistory. |
369 | from lp.soyuz.model.distroarchseries import ( |
370 | DistroArchSeries) |
371 | |
372 | |
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 | |
378 | James uses the link in the copy summary to go straight to the target |
379 | PPA, his own. There he can see the just copied package as PENDING and |
380 | -also marked as pending build for i386. |
381 | +also marked as pending build for i386. Note, he is also informed that |
382 | +there is actually a newer version already available in hoary. |
383 | |
384 | >>> jblack_browser.getLink('PPA for James Blackwell').click() |
385 | >>> print jblack_browser.title |
386 | @@ -252,7 +253,7 @@ |
387 | >>> print_ppa_packages(jblack_browser.contents) |
388 | Source Published Status Series Section Build |
389 | Status |
390 | - pmount - 0.1-1 Pending Hoary Editors i386 |
391 | + pmount - 0.1-1 (Newer...) Pending Hoary Editors i386 |
392 | |
393 | Expanding the details area, James can see that the source copied is |
394 | indeed the same by checking the changelog, also that the binaries |
395 | @@ -337,7 +338,7 @@ |
396 | >>> print_ppa_packages(jblack_browser.contents) |
397 | Source Published Status Series Section Build |
398 | Status |
399 | - pmount - 0.1-1 Pending Hoary Editors i386 |
400 | + pmount - 0.1-1 (Newer...) Pending Hoary Editors i386 |
401 | |
402 | Then selects pmount in hoary. |
403 | |
404 | @@ -504,7 +505,7 @@ |
405 | Source Published Status Series Section Build |
406 | Status |
407 | pmount - 0.1-1 Pending Grumpy Editors |
408 | - pmount - 0.1-1 Pending Hoary Editors |
409 | + pmount - 0.1-1 (Newer...) Pending Hoary Editors |
410 | |
411 | After the binary package go from PENDING->PUBLISHED, the page reflects the |
412 | changes: |
413 | @@ -521,7 +522,7 @@ |
414 | Source Published Status Series Section Build |
415 | Status |
416 | pmount - 0.1-1 Pending Grumpy Editors |
417 | - pmount - 0.1-1 Pending Hoary Editors |
418 | + pmount - 0.1-1 (Newer...) Pending Hoary Editors |
419 | |
420 | If James performs exactly the same copy procedure again, a message |
421 | stating that all packages involved were already copied to the |
422 | @@ -565,7 +566,7 @@ |
423 | Source Published Status Series Section Build |
424 | Status |
425 | pmount - 0.1-1 Pending Grumpy Editors |
426 | - pmount - 0.1-1 Deleted Hoary Editors |
427 | + pmount - 0.1-1 (Newer...) Deleted Hoary Editors |
428 | |
429 | In the minute after James had deleted the package, he discovered that |
430 | 'pmount' might work correctly in warty. |
431 | @@ -593,7 +594,7 @@ |
432 | Source Published Status Series Section Build |
433 | Status |
434 | pmount - 0.1-1 Pending Grumpy Editors |
435 | - pmount - 0.1-1 Deleted Hoary Editors |
436 | + pmount - 0.1-1 (Newer...) Deleted Hoary Editors |
437 | |
438 | James mistakenly requests the copy without including the binaries |
439 | resulting from the hoary build, which are still published in grumpy. |
440 | @@ -644,7 +645,7 @@ |
441 | Status |
442 | pmount - 0.1-1 Pending Warty Editors |
443 | pmount - 0.1-1 Pending Grumpy Editors |
444 | - pmount - 0.1-1 Deleted Hoary Editors |
445 | + pmount - 0.1-1 (Newer...) Deleted Hoary Editors |
446 | |
447 | |
448 | === Copying packages to other PPAs you participate === |
449 | @@ -744,7 +745,7 @@ |
450 | Source Uploader Published Status Series Section Build |
451 | Status |
452 | iceweasel...(...) no signer Pending Hoary Editors |
453 | - pmount - 0.1-1 no signer Pending Hoary Editors |
454 | + pmount...(...) no signer Pending Hoary Editors |
455 | |
456 | James just gives a quick look to the details section of each copied |
457 | sources to ensure the binaries are really there. |
458 | @@ -838,7 +839,7 @@ |
459 | Status |
460 | pmount - 0.1-1 Pending Warty Editors |
461 | pmount - 0.1-1 Pending Grumpy Editors |
462 | - pmount - 0.1-1 Deleted Hoary Editors |
463 | + pmount - 0.1-1 (Newer...) Deleted Hoary Editors |
464 | |
465 | >>> jblack_pub_ids = getPPAPubIDsFor('jblack') |
466 | |
467 | @@ -924,10 +925,10 @@ |
468 | >>> print_ppa_packages(jblack_browser.contents) |
469 | Source Published Status Series Section Build |
470 | Status |
471 | - pmount - 0.1-1 Pending Hoary Editors |
472 | + pmount - 0.1-1 (Newer...) Pending Hoary Editors |
473 | pmount - 0.1-1 Pending Warty Editors |
474 | pmount - 0.1-1 Pending Grumpy Editors |
475 | - pmount - 0.1-1 Deleted Hoary Editors |
476 | + pmount - 0.1-1 (Newer...) Deleted Hoary Editors |
477 | |
478 | James is not yet satisfied and to create some fun we will publish |
479 | different version of foo_1.0 in Mark's and Celso's PPAs and a foo_2.0 |
480 | @@ -1064,7 +1065,7 @@ |
481 | Status |
482 | foo - 2.0 (changesfile) Pending Hoary Base i386 |
483 | foo - 1.1 (changesfile) Pending Warty Base |
484 | - pmount - 0.1-1 Pending Hoary Editors |
485 | + pmount - 0.1-1 (Newer...) Pending Hoary Editors |
486 | pmount - 0.1-1 Pending Warty Editors |
487 | pmount - 0.1-1 Pending Grumpy Editors |
488 | |
489 | |
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 | iceweasel 1.0 no signer (2007-07-09) |
495 | pmount 0.1-1 no signer (2007-07-09) |
496 | |
497 | +If a ppa package has been superseded by an package in the primary |
498 | +archive for the distroseries, this will be indicated with a link |
499 | +to the newer version. |
500 | + |
501 | + # Publish a newer version of iceweasel in hoary. |
502 | + >>> login('admin@canonical.com') |
503 | + >>> from lp.soyuz.tests.test_publishing import SoyuzTestPublisher |
504 | + >>> test_publisher = SoyuzTestPublisher() |
505 | + >>> warty = getUtility(IDistributionSet)['ubuntu']['warty'] |
506 | + >>> test_publisher.prepareBreezyAutotest() |
507 | + >>> new_version = test_publisher.getPubSource( |
508 | + ... distroseries=warty, version="1.1", sourcename='iceweasel') |
509 | + >>> import transaction |
510 | + >>> transaction.commit() |
511 | + >>> logout() |
512 | + |
513 | + >>> anon_browser.reload() |
514 | + >>> print_archive_package_rows(anon_browser.contents) |
515 | + Package Version Uploaded by |
516 | + cdrkit 1.0 no signer (2007-07-09) |
517 | + commercialpackage 1.0-1 no signer |
518 | + iceweasel 1.0 (Newer version available) |
519 | + no signer (2007-07-09) |
520 | + pmount 0.1-1 no signer (2007-07-09) |
521 | + |
522 | +The link itself will point to the newer version in the distro series. |
523 | + |
524 | + >>> print anon_browser.getLink('Newer version').url |
525 | + http://launchpad.dev/ubuntu/warty/+source/iceweasel/1.1 |
526 | + |
527 | A Latest updates portlet is included on the index page indicating the |
528 | latest published sources with their states. |
529 | |
530 | @@ -417,7 +447,8 @@ |
531 | Package Version Uploaded by |
532 | cdrkit 1.0 no signer (2007-07-09) |
533 | commercialpackage 1.0-1 no signer |
534 | - iceweasel 1.0 no signer (2007-07-09) |
535 | + iceweasel 1.0 (Newer version available) |
536 | + no signer (2007-07-09) |
537 | pmount 0.1-1 no signer (2007-07-09) |
538 | |
539 | If the packages are filtered by a particular series, then the result |
540 | |
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 | </tr> |
546 | </thead> |
547 | <tbody> |
548 | - <tr tal:repeat="publishing batch"> |
549 | + <tal:publishing repeat="publishing batch"> |
550 | + <tr tal:define="newer_version publishing/newer_distroseries_version" |
551 | + tal:attributes="class python: newer_version and |
552 | + 'superseded' or ''"> |
553 | <td> |
554 | <img src="/@@/package-source" /> |
555 | <tal:source_name replace="publishing/sourcepackagerelease/name"> |
556 | foo |
557 | </tal:source_name> |
558 | </td> |
559 | - <td tal:define=" |
560 | + <td> |
561 | + <tal:version define=" |
562 | version_name publishing/meta_distroseriessourcepackagerelease/version;" |
563 | - tal:content="version_name"> |
564 | - 2.0.39</td> |
565 | + content="version_name"> |
566 | + 2.0.39 |
567 | + </tal:version> |
568 | + <tal:newer_version condition="newer_version"> |
569 | + (<a tal:attributes="href newer_version/fmt:url">Newer version</a> |
570 | + available) |
571 | + </tal:newer_version> |
572 | + </td> |
573 | <td tal:define="spr publishing/sourcepackagerelease; |
574 | signer spr/dscsigningkey/owner/fmt:link|string:no signer"> |
575 | <span tal:replace="structure signer">Joe Bloggs</span> |
576 | @@ -274,6 +284,7 @@ |
577 | </tal:date_published> |
578 | </td> |
579 | </tr> |
580 | + </tal:publishing> |
581 | </tbody> |
582 | </table> |
583 | |
584 | |
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 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
590 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
591 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
592 | - omit-tag=""> |
593 | + omit-tag="" |
594 | + define="newer_version context/newer_distroseries_version"> |
595 | |
596 | - <tr class="archive_package_row"> |
597 | + <tr tal:attributes="class python: ('archive_package_row ' + ( |
598 | + newer_version and 'superseded' or ''))"> |
599 | <td style="white-space: nowrap"> |
600 | <input |
601 | name="field.selected_sources" type="checkbox" |
602 | @@ -21,6 +23,11 @@ |
603 | foo - 1.0 |
604 | </tal:source_name> |
605 | </a> |
606 | + |
607 | + <tal:newer_version tal:condition="newer_version"> |
608 | + (<a tal:attributes="href newer_version/fmt:url">Newer version</a> |
609 | + available) |
610 | + </tal:newer_version> |
611 | </td> |
612 | <td> |
613 | <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.