Merge lp:~rvb/launchpad/sync-bug-827608-credit-copy into lp:launchpad
- sync-bug-827608-credit-copy
- Merge into devel
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Raphaël Badin | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 13997 | ||||
Proposed branch: | lp:~rvb/launchpad/sync-bug-827608-credit-copy | ||||
Merge into: | lp:launchpad | ||||
Prerequisite: | lp:~rvb/launchpad/sync-bug-827608-populate-ancestor | ||||
Diff against target: |
730 lines (+167/-124) 10 files modified
lib/lp/registry/browser/person.py (+32/-24) lib/lp/registry/doc/person.txt (+19/-15) lib/lp/registry/interfaces/person.py (+9/-7) lib/lp/registry/model/person.py (+34/-18) lib/lp/registry/templates/person-macros.pt (+10/-10) lib/lp/registry/templates/person-related-software.pt (+17/-17) lib/lp/soyuz/stories/soyuz/xx-person-packages.txt (+26/-13) lib/lp/soyuz/templates/person-maintained-packages.pt (+4/-4) lib/lp/soyuz/templates/person-ppa-packages.pt (+12/-12) lib/lp/soyuz/templates/person-uploaded-packages.pt (+4/-4) |
||||
To merge this branch: | bzr merge lp:~rvb/launchpad/sync-bug-827608-credit-copy | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+74769@code.launchpad.net |
Commit message
Refactor _latestSeriesQuery to return SourcePackagePu
Description of the change
This branch is another step towards fixing 827608. The goal of this branch is to refactor _latestSeriesQuery (lib/lp/
The only catch is that the order of the objects in lib/lp/
= Tests =
(lots of tests are affected by this change)
./bin/test -vvc -t person.txt
./bin/test -vvc -t xx-person-
./bin/test -vvc test_person_view
= QA =
None.
Raphaël Badin (rvb) wrote : | # |
> This branch looks good. I'm a little concerned about the change in sort order
> from getLatestMainta
> pages. Hope it isn't jarring.
Thanks a lot for the review. I checked this with Julian and also had a few queries run on the production db to have an idea of the impact of this reordering. I think this really makes sense (the spph.datecreated is more accurate for what we want to show) and also the impact will be pretty minimal from what I can see looking at production data.
Raphaël Badin (rvb) wrote : | # |
Fixed failures in the doctests caused by the ordering of the returned objects (previously SPRs sorted by dateuploaded and now SPPHs sorted by datecreated).
Preview Diff
1 | === modified file 'lib/lp/registry/browser/person.py' | |||
2 | --- lib/lp/registry/browser/person.py 2011-09-13 05:23:16 +0000 | |||
3 | +++ lib/lp/registry/browser/person.py 2011-09-19 07:53:32 +0000 | |||
4 | @@ -326,7 +326,7 @@ | |||
5 | 326 | from lp.soyuz.interfaces.archive import IArchiveSet | 326 | from lp.soyuz.interfaces.archive import IArchiveSet |
6 | 327 | from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriberSet | 327 | from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriberSet |
7 | 328 | from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet | 328 | from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet |
9 | 329 | from lp.soyuz.interfaces.sourcepackagerelease import ISourcePackageRelease | 329 | from lp.soyuz.interfaces.publishing import ISourcePackagePublishingHistory |
10 | 330 | 330 | ||
11 | 331 | 331 | ||
12 | 332 | COMMASPACE = ', ' | 332 | COMMASPACE = ', ' |
13 | @@ -5156,17 +5156,18 @@ | |||
14 | 5156 | return Link('+subscribedquestions', text, summary, icon='question') | 5156 | return Link('+subscribedquestions', text, summary, icon='question') |
15 | 5157 | 5157 | ||
16 | 5158 | 5158 | ||
19 | 5159 | class SourcePackageReleaseWithStats: | 5159 | class SourcePackagePublishingHistoryWithStats: |
20 | 5160 | """An ISourcePackageRelease, with extra stats added.""" | 5160 | """An ISourcePackagePublishinghistory, with extra stats added.""" |
21 | 5161 | 5161 | ||
24 | 5162 | implements(ISourcePackageRelease) | 5162 | implements(ISourcePackagePublishingHistory) |
25 | 5163 | delegates(ISourcePackageRelease) | 5163 | delegates(ISourcePackagePublishingHistory) |
26 | 5164 | failed_builds = None | 5164 | failed_builds = None |
27 | 5165 | needs_building = None | 5165 | needs_building = None |
28 | 5166 | 5166 | ||
30 | 5167 | def __init__(self, sourcepackage_release, open_bugs, open_questions, | 5167 | def __init__(self, spph, open_bugs, open_questions, |
31 | 5168 | failed_builds, needs_building): | 5168 | failed_builds, needs_building): |
33 | 5169 | self.context = sourcepackage_release | 5169 | self.context = spph |
34 | 5170 | self.spr = spph.sourcepackagerelease | ||
35 | 5170 | self.open_bugs = open_bugs | 5171 | self.open_bugs = open_bugs |
36 | 5171 | self.open_questions = open_questions | 5172 | self.open_questions = open_questions |
37 | 5172 | self.failed_builds = failed_builds | 5173 | self.failed_builds = failed_builds |
38 | @@ -5255,7 +5256,7 @@ | |||
39 | 5255 | 5256 | ||
40 | 5256 | return header_message | 5257 | return header_message |
41 | 5257 | 5258 | ||
43 | 5258 | def filterPPAPackageList(self, packages): | 5259 | def filterPPAPackageList(self, spphs): |
44 | 5259 | """Remove packages that the user is not allowed to see. | 5260 | """Remove packages that the user is not allowed to see. |
45 | 5260 | 5261 | ||
46 | 5261 | Given a list of PPA packages, some might be in a PPA that the | 5262 | Given a list of PPA packages, some might be in a PPA that the |
47 | @@ -5269,14 +5270,15 @@ | |||
48 | 5269 | # IPerson.getLatestUploadedPPAPackages() but formulating the SQL | 5270 | # IPerson.getLatestUploadedPPAPackages() but formulating the SQL |
49 | 5270 | # query is virtually impossible! | 5271 | # query is virtually impossible! |
50 | 5271 | results = [] | 5272 | results = [] |
52 | 5272 | for package in packages: | 5273 | for spph in spphs: |
53 | 5274 | package = spph.sourcepackagerelease | ||
54 | 5273 | # Make a shallow copy to remove the Zope security. | 5275 | # Make a shallow copy to remove the Zope security. |
55 | 5274 | archives = set(package.published_archives) | 5276 | archives = set(package.published_archives) |
56 | 5275 | # Ensure the SPR.upload_archive is also considered. | 5277 | # Ensure the SPR.upload_archive is also considered. |
57 | 5276 | archives.add(package.upload_archive) | 5278 | archives.add(package.upload_archive) |
58 | 5277 | for archive in archives: | 5279 | for archive in archives: |
59 | 5278 | if check_permission('launchpad.View', archive): | 5280 | if check_permission('launchpad.View', archive): |
61 | 5279 | results.append(package) | 5281 | results.append(spph) |
62 | 5280 | break | 5282 | break |
63 | 5281 | 5283 | ||
64 | 5282 | return results | 5284 | return results |
65 | @@ -5329,10 +5331,10 @@ | |||
66 | 5329 | self.uploaded_packages_header_message = header_message | 5331 | self.uploaded_packages_header_message = header_message |
67 | 5330 | return results | 5332 | return results |
68 | 5331 | 5333 | ||
70 | 5332 | def _calculateBuildStats(self, package_releases): | 5334 | def _calculateBuildStats(self, spphs): |
71 | 5333 | """Calculate failed builds and needs_build state. | 5335 | """Calculate failed builds and needs_build state. |
72 | 5334 | 5336 | ||
74 | 5335 | For each of the package_releases, calculate the failed builds | 5337 | For each of the spphs, calculate the failed builds |
75 | 5336 | and the needs_build state, and return a tuple of two dictionaries, | 5338 | and the needs_build state, and return a tuple of two dictionaries, |
76 | 5337 | one containing the failed builds and the other containing | 5339 | one containing the failed builds and the other containing |
77 | 5338 | True or False according to the needs_build state, both keyed by | 5340 | True or False according to the needs_build state, both keyed by |
78 | @@ -5341,14 +5343,15 @@ | |||
79 | 5341 | # Calculate all the failed builds with one query. | 5343 | # Calculate all the failed builds with one query. |
80 | 5342 | build_set = getUtility(IBinaryPackageBuildSet) | 5344 | build_set = getUtility(IBinaryPackageBuildSet) |
81 | 5343 | package_release_ids = [ | 5345 | package_release_ids = [ |
83 | 5344 | package_release.id for package_release in package_releases] | 5346 | spph.sourcepackagerelease.id for spph in spphs] |
84 | 5345 | all_builds = build_set.getBuildsBySourcePackageRelease( | 5347 | all_builds = build_set.getBuildsBySourcePackageRelease( |
85 | 5346 | package_release_ids) | 5348 | package_release_ids) |
86 | 5347 | # Make a dictionary of lists of builds keyed by SourcePackageRelease | 5349 | # Make a dictionary of lists of builds keyed by SourcePackageRelease |
87 | 5348 | # and a dictionary of "needs build" state keyed by the same. | 5350 | # and a dictionary of "needs build" state keyed by the same. |
88 | 5349 | builds_by_package = {} | 5351 | builds_by_package = {} |
89 | 5350 | needs_build_by_package = {} | 5352 | needs_build_by_package = {} |
91 | 5351 | for package in package_releases: | 5353 | for spph in spphs: |
92 | 5354 | package = spph.sourcepackagerelease | ||
93 | 5352 | builds_by_package[package] = [] | 5355 | builds_by_package[package] = [] |
94 | 5353 | needs_build_by_package[package] = False | 5356 | needs_build_by_package[package] = False |
95 | 5354 | for build in all_builds: | 5357 | for build in all_builds: |
96 | @@ -5363,11 +5366,14 @@ | |||
97 | 5363 | 5366 | ||
98 | 5364 | return (builds_by_package, needs_build_by_package) | 5367 | return (builds_by_package, needs_build_by_package) |
99 | 5365 | 5368 | ||
101 | 5366 | def _addStatsToPackages(self, package_releases): | 5369 | def _addStatsToPackages(self, spphs): |
102 | 5367 | """Add stats to the given package releases, and return them.""" | 5370 | """Add stats to the given package releases, and return them.""" |
103 | 5371 | filtered_spphs = [ | ||
104 | 5372 | spph for spph in spphs if | ||
105 | 5373 | check_permission('launchpad.View', spph)] | ||
106 | 5368 | distro_packages = [ | 5374 | distro_packages = [ |
109 | 5369 | package_release.distrosourcepackage | 5375 | spph.sourcepackagerelease.distrosourcepackage |
110 | 5370 | for package_release in package_releases] | 5376 | for spph in filtered_spphs] |
111 | 5371 | package_bug_counts = getUtility(IBugTaskSet).getBugCountsForPackages( | 5377 | package_bug_counts = getUtility(IBugTaskSet).getBugCountsForPackages( |
112 | 5372 | self.user, distro_packages) | 5378 | self.user, distro_packages) |
113 | 5373 | open_bugs = {} | 5379 | open_bugs = {} |
114 | @@ -5380,15 +5386,17 @@ | |||
115 | 5380 | distro_packages) | 5386 | distro_packages) |
116 | 5381 | 5387 | ||
117 | 5382 | builds_by_package, needs_build_by_package = self._calculateBuildStats( | 5388 | builds_by_package, needs_build_by_package = self._calculateBuildStats( |
119 | 5383 | package_releases) | 5389 | filtered_spphs) |
120 | 5384 | 5390 | ||
121 | 5385 | return [ | 5391 | return [ |
128 | 5386 | SourcePackageReleaseWithStats( | 5392 | SourcePackagePublishingHistoryWithStats( |
129 | 5387 | package, open_bugs[package.distrosourcepackage], | 5393 | spph, |
130 | 5388 | package_question_counts[package.distrosourcepackage], | 5394 | open_bugs[spph.meta_sourcepackage.distribution_sourcepackage], |
131 | 5389 | builds_by_package[package], | 5395 | package_question_counts[ |
132 | 5390 | needs_build_by_package[package]) | 5396 | spph.meta_sourcepackage.distribution_sourcepackage], |
133 | 5391 | for package in package_releases] | 5397 | builds_by_package[spph.sourcepackagerelease], |
134 | 5398 | needs_build_by_package[spph.sourcepackagerelease]) | ||
135 | 5399 | for spph in filtered_spphs] | ||
136 | 5392 | 5400 | ||
137 | 5393 | def setUpBatch(self, packages): | 5401 | def setUpBatch(self, packages): |
138 | 5394 | """Set up the batch navigation for the page being viewed. | 5402 | """Set up the batch navigation for the page being viewed. |
139 | 5395 | 5403 | ||
140 | === modified file 'lib/lp/registry/doc/person.txt' | |||
141 | --- lib/lp/registry/doc/person.txt 2011-08-23 13:07:09 +0000 | |||
142 | +++ lib/lp/registry/doc/person.txt 2011-09-19 07:53:32 +0000 | |||
143 | @@ -958,31 +958,34 @@ | |||
144 | 958 | question to any PPA. | 958 | question to any PPA. |
145 | 959 | 959 | ||
146 | 960 | >>> mark = personset.getByName('mark') | 960 | >>> mark = personset.getByName('mark') |
148 | 961 | >>> for sprelease in mark.getLatestMaintainedPackages(): | 961 | >>> for spph in mark.getLatestMaintainedPackages(): |
149 | 962 | ... sprelease = spph.sourcepackagerelease | ||
150 | 962 | ... print (sprelease.name, | 963 | ... print (sprelease.name, |
151 | 963 | ... sprelease.upload_distroseries.fullseriesname, | 964 | ... sprelease.upload_distroseries.fullseriesname, |
152 | 964 | ... sprelease.version) | 965 | ... sprelease.version) |
153 | 966 | (u'mozilla-firefox', u'Ubuntu Warty', u'0.9') | ||
154 | 965 | (u'alsa-utils', u'Debian Sid', u'1.0.9a-4') | 967 | (u'alsa-utils', u'Debian Sid', u'1.0.9a-4') |
155 | 968 | (u'alsa-utils', u'Ubuntu Warty', u'1.0.8-1ubuntu1') | ||
156 | 966 | (u'pmount', u'Ubuntu Hoary', u'0.1-2') | 969 | (u'pmount', u'Ubuntu Hoary', u'0.1-2') |
157 | 970 | (u'evolution', u'Ubuntu Hoary', u'1.0') | ||
158 | 967 | (u'netapplet', u'Ubuntu Warty', u'0.99.6-1') | 971 | (u'netapplet', u'Ubuntu Warty', u'0.99.6-1') |
159 | 968 | (u'netapplet', u'Ubuntu Hoary', u'1.0-1') | 972 | (u'netapplet', u'Ubuntu Hoary', u'1.0-1') |
160 | 969 | (u'alsa-utils', u'Ubuntu Warty', u'1.0.8-1ubuntu1') | ||
161 | 970 | (u'mozilla-firefox', u'Ubuntu Warty', u'0.9') | ||
162 | 971 | (u'evolution', u'Ubuntu Hoary', u'1.0') | ||
163 | 972 | 973 | ||
165 | 973 | >>> for sprelease in mark.getLatestUploadedButNotMaintainedPackages(): | 974 | >>> for spph in mark.getLatestUploadedButNotMaintainedPackages(): |
166 | 975 | ... sprelease = spph.sourcepackagerelease | ||
167 | 974 | ... print (sprelease.name, | 976 | ... print (sprelease.name, |
168 | 975 | ... sprelease.upload_distroseries.fullseriesname, | 977 | ... sprelease.upload_distroseries.fullseriesname, |
169 | 976 | ... sprelease.version) | 978 | ... sprelease.version) |
170 | 979 | (u'cdrkit', u'Ubuntu Breezy-autotest', u'1.0') | ||
171 | 977 | (u'foobar', u'Ubuntu Breezy-autotest', u'1.0') | 980 | (u'foobar', u'Ubuntu Breezy-autotest', u'1.0') |
172 | 978 | (u'cdrkit', u'Ubuntu Breezy-autotest', u'1.0') | ||
173 | 979 | (u'libstdc++', u'Ubuntu Hoary', u'b8p') | ||
174 | 980 | (u'cnews', u'Ubuntu Hoary', u'cr.g7-37') | ||
175 | 981 | (u'linux-source-2.6.15', u'Ubuntu Hoary', u'2.6.15.3') | 981 | (u'linux-source-2.6.15', u'Ubuntu Hoary', u'2.6.15.3') |
176 | 982 | (u'alsa-utils', u'Ubuntu Hoary', u'1.0.9a-4ubuntu1') | 982 | (u'alsa-utils', u'Ubuntu Hoary', u'1.0.9a-4ubuntu1') |
177 | 983 | (u'cnews', u'Ubuntu Hoary', u'cr.g7-37') | ||
178 | 984 | (u'libstdc++', u'Ubuntu Hoary', u'b8p') | ||
179 | 983 | 985 | ||
182 | 984 | >>> mark_spreleases = mark.getLatestUploadedPPAPackages() | 986 | >>> mark_spphs = mark.getLatestUploadedPPAPackages() |
183 | 985 | >>> for sprelease in mark_spreleases: | 987 | >>> for spph in mark_spphs: |
184 | 988 | ... sprelease = spph.sourcepackagerelease | ||
185 | 986 | ... print (sprelease.name, | 989 | ... print (sprelease.name, |
186 | 987 | ... sprelease.version, | 990 | ... sprelease.version, |
187 | 988 | ... sprelease.creator.name, | 991 | ... sprelease.creator.name, |
188 | @@ -995,13 +998,14 @@ | |||
189 | 995 | issue mentioned in bug 157303, where source with same creator and | 998 | issue mentioned in bug 157303, where source with same creator and |
190 | 996 | maintainer got omitted from the results: | 999 | maintainer got omitted from the results: |
191 | 997 | 1000 | ||
195 | 998 | >>> any_spr = mark_spreleases[0] | 1001 | >>> any_spph = mark_spphs[0] |
196 | 999 | >>> naked_spr = removeSecurityProxy(any_spr) | 1002 | >>> naked_spph = removeSecurityProxy(any_spph) |
197 | 1000 | >>> naked_spr.maintainer = mark | 1003 | >>> naked_spph.sourcepackagerelease.maintainer = mark |
198 | 1001 | >>> flush_database_updates() | 1004 | >>> flush_database_updates() |
199 | 1002 | 1005 | ||
202 | 1003 | >>> mark_spreleases = mark.getLatestUploadedPPAPackages() | 1006 | >>> mark_spphs = mark.getLatestUploadedPPAPackages() |
203 | 1004 | >>> for sprelease in mark_spreleases: | 1007 | >>> for spph in mark_spphs: |
204 | 1008 | ... sprelease = spph.sourcepackagerelease | ||
205 | 1005 | ... print (sprelease.name, | 1009 | ... print (sprelease.name, |
206 | 1006 | ... sprelease.version, | 1010 | ... sprelease.version, |
207 | 1007 | ... sprelease.creator.name, | 1011 | ... sprelease.creator.name, |
208 | 1008 | 1012 | ||
209 | === modified file 'lib/lp/registry/interfaces/person.py' | |||
210 | --- lib/lp/registry/interfaces/person.py 2011-08-28 08:36:14 +0000 | |||
211 | +++ lib/lp/registry/interfaces/person.py 2011-09-19 07:53:32 +0000 | |||
212 | @@ -1234,24 +1234,26 @@ | |||
213 | 1234 | """ | 1234 | """ |
214 | 1235 | 1235 | ||
215 | 1236 | def getLatestMaintainedPackages(): | 1236 | def getLatestMaintainedPackages(): |
217 | 1237 | """Return `SourcePackageRelease`s maintained by this person. | 1237 | """Return `SourcePackagePublishingHistory`s related to SPRs maintained |
218 | 1238 | by this person. | ||
219 | 1238 | 1239 | ||
221 | 1239 | This method will only include the latest source package release | 1240 | This method will only include the latest source package publishings |
222 | 1240 | for each source package name, distribution series combination. | 1241 | for each source package name, distribution series combination. |
223 | 1241 | """ | 1242 | """ |
224 | 1242 | 1243 | ||
225 | 1243 | def getLatestUploadedButNotMaintainedPackages(): | 1244 | def getLatestUploadedButNotMaintainedPackages(): |
228 | 1244 | """Return `SourcePackageRelease`s created by this person but | 1245 | """Return `SourcePackagePublishingHistory`s created by this person |
229 | 1245 | not maintained by him. | 1246 | but not maintained by him. |
230 | 1246 | 1247 | ||
232 | 1247 | This method will only include the latest source package release | 1248 | This method will only include the latest source package publishings |
233 | 1248 | for each source package name, distribution series combination. | 1249 | for each source package name, distribution series combination. |
234 | 1249 | """ | 1250 | """ |
235 | 1250 | 1251 | ||
236 | 1251 | def getLatestUploadedPPAPackages(): | 1252 | def getLatestUploadedPPAPackages(): |
238 | 1252 | """Return `SourcePackageRelease`s uploaded by this person to any PPA. | 1253 | """Return `SourcePackagePublishingHistory`s related to SPRs uploaded |
239 | 1254 | by this person to any PPA. | ||
240 | 1253 | 1255 | ||
242 | 1254 | This method will only include the latest source package release | 1256 | This method will only include the latest source package publishings |
243 | 1255 | for each source package name, distribution series combination. | 1257 | for each source package name, distribution series combination. |
244 | 1256 | """ | 1258 | """ |
245 | 1257 | 1259 | ||
246 | 1258 | 1260 | ||
247 | === modified file 'lib/lp/registry/model/person.py' | |||
248 | --- lib/lp/registry/model/person.py 2011-09-13 10:21:35 +0000 | |||
249 | +++ lib/lp/registry/model/person.py 2011-09-19 07:53:32 +0000 | |||
250 | @@ -33,7 +33,10 @@ | |||
251 | 33 | datetime, | 33 | datetime, |
252 | 34 | timedelta, | 34 | timedelta, |
253 | 35 | ) | 35 | ) |
255 | 36 | from operator import attrgetter | 36 | from operator import ( |
256 | 37 | attrgetter, | ||
257 | 38 | itemgetter, | ||
258 | 39 | ) | ||
259 | 37 | import random | 40 | import random |
260 | 38 | import re | 41 | import re |
261 | 39 | import subprocess | 42 | import subprocess |
262 | @@ -297,7 +300,7 @@ | |||
263 | 297 | from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet | 300 | from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet |
264 | 298 | from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriberSet | 301 | from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriberSet |
265 | 299 | from lp.soyuz.model.archive import Archive | 302 | from lp.soyuz.model.archive import Archive |
267 | 300 | from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease | 303 | from lp.soyuz.model.publishing import SourcePackagePublishingHistory |
268 | 301 | from lp.translations.model.hastranslationimports import ( | 304 | from lp.translations.model.hastranslationimports import ( |
269 | 302 | HasTranslationImportsMixin, | 305 | HasTranslationImportsMixin, |
270 | 303 | ) | 306 | ) |
271 | @@ -2596,16 +2599,17 @@ | |||
272 | 2596 | uploader_only=True, ppa_only=True) | 2599 | uploader_only=True, ppa_only=True) |
273 | 2597 | 2600 | ||
274 | 2598 | def _latestSeriesQuery(self, uploader_only=False, ppa_only=False): | 2601 | def _latestSeriesQuery(self, uploader_only=False, ppa_only=False): |
276 | 2599 | """Return the sourcepackagereleases (SPRs) related to this person. | 2602 | """Return the sourcepackagepublishinghistory (SPPHs) related to this |
277 | 2603 | person. | ||
278 | 2600 | 2604 | ||
284 | 2601 | :param uploader_only: controls if we are interested in SPRs where | 2605 | :param uploader_only: controls if we are interested in SPPHs related |
285 | 2602 | the person in question is only the uploader (creator) and not the | 2606 | to SPRs where the person in question is only the uploader |
286 | 2603 | maintainer (debian-syncs) if the `ppa_only` parameter is also | 2607 | (creator) and not the maintainer (debian-syncs) if the `ppa_only` |
287 | 2604 | False, or, if the flag is False, it returns all SPR maintained | 2608 | parameter is also False, or, if the flag is False, it returns |
288 | 2605 | by this person. | 2609 | SPPHs related to SPRs maintained by this person. |
289 | 2606 | 2610 | ||
290 | 2607 | :param ppa_only: controls if we are interested only in source | 2611 | :param ppa_only: controls if we are interested only in source |
292 | 2608 | package releases targeted to any PPAs or, if False, sources | 2612 | package publishings targeted to any PPAs or, if False, sources |
293 | 2609 | targeted to primary archives. | 2613 | targeted to primary archives. |
294 | 2610 | 2614 | ||
295 | 2611 | Active 'ppa_only' flag is usually associated with active | 2615 | Active 'ppa_only' flag is usually associated with active |
296 | @@ -2637,11 +2641,10 @@ | |||
297 | 2637 | 2641 | ||
298 | 2638 | query_clauses = " AND ".join(clauses) | 2642 | query_clauses = " AND ".join(clauses) |
299 | 2639 | query = """ | 2643 | query = """ |
300 | 2640 | SourcePackageRelease.id IN ( | ||
301 | 2641 | SELECT DISTINCT ON (upload_distroseries, | 2644 | SELECT DISTINCT ON (upload_distroseries, |
302 | 2642 | sourcepackagerelease.sourcepackagename, | 2645 | sourcepackagerelease.sourcepackagename, |
303 | 2643 | upload_archive) | 2646 | upload_archive) |
305 | 2644 | sourcepackagerelease.id | 2647 | spph.id |
306 | 2645 | FROM sourcepackagerelease, archive, | 2648 | FROM sourcepackagerelease, archive, |
307 | 2646 | sourcepackagepublishinghistory as spph | 2649 | sourcepackagepublishinghistory as spph |
308 | 2647 | WHERE | 2650 | WHERE |
309 | @@ -2650,15 +2653,28 @@ | |||
310 | 2650 | %(more_query_clauses)s | 2653 | %(more_query_clauses)s |
311 | 2651 | ORDER BY upload_distroseries, | 2654 | ORDER BY upload_distroseries, |
312 | 2652 | sourcepackagerelease.sourcepackagename, | 2655 | sourcepackagerelease.sourcepackagename, |
315 | 2653 | upload_archive, dateuploaded DESC | 2656 | upload_archive, |
316 | 2654 | ) | 2657 | dateuploaded DESC, spph.datecreated DESC |
317 | 2655 | """ % dict(more_query_clauses=query_clauses) | 2658 | """ % dict(more_query_clauses=query_clauses) |
318 | 2656 | 2659 | ||
324 | 2657 | rset = SourcePackageRelease.select( | 2660 | cur = cursor() |
325 | 2658 | query, | 2661 | cur.execute(query) |
326 | 2659 | orderBy=['-SourcePackageRelease.dateuploaded', | 2662 | spph_ids = map(itemgetter(0), cur.fetchall()) |
327 | 2660 | 'SourcePackageRelease.id'], | 2663 | |
328 | 2661 | prejoins=['sourcepackagename', 'maintainer', 'upload_archive']) | 2664 | # is_in(x) does not behave if x is []. |
329 | 2665 | if len(spph_ids) == 0: | ||
330 | 2666 | return EmptyResultSet() | ||
331 | 2667 | |||
332 | 2668 | rset = SourcePackagePublishingHistory.select( | ||
333 | 2669 | SourcePackagePublishingHistory.id.is_in(spph_ids), | ||
334 | 2670 | orderBy=[ | ||
335 | 2671 | '-datecreated', | ||
336 | 2672 | ], | ||
337 | 2673 | prejoins=[ | ||
338 | 2674 | 'sourcepackagerelease.sourcepackagename', | ||
339 | 2675 | 'sourcepackagerelease.maintainer', | ||
340 | 2676 | 'sourcepackagerelease.upload_archive', | ||
341 | 2677 | ]) | ||
342 | 2662 | 2678 | ||
343 | 2663 | return rset | 2679 | return rset |
344 | 2664 | 2680 | ||
345 | 2665 | 2681 | ||
346 | === modified file 'lib/lp/registry/templates/person-macros.pt' | |||
347 | --- lib/lp/registry/templates/person-macros.pt 2011-07-14 05:12:43 +0000 | |||
348 | +++ lib/lp/registry/templates/person-macros.pt 2011-09-19 07:53:32 +0000 | |||
349 | @@ -120,15 +120,15 @@ | |||
350 | 120 | </div> | 120 | </div> |
351 | 121 | </metal:macro> | 121 | </metal:macro> |
352 | 122 | 122 | ||
354 | 123 | <metal:macro define-macro="sourcepackagerelease-rows"> | 123 | <metal:macro define-macro="spph-rows"> |
355 | 124 | 124 | ||
356 | 125 | <tal:comment replace="nothing"> | 125 | <tal:comment replace="nothing"> |
357 | 126 | This macro expects the following variables defined: | 126 | This macro expects the following variables defined: |
359 | 127 | :sourcepackagereleases: A list of SourcePackageRelease objects | 127 | :spphs: A list of SourcePackagePublishingHistory objects |
360 | 128 | </tal:comment> | 128 | </tal:comment> |
361 | 129 | 129 | ||
364 | 130 | <tr tal:repeat="sourcepackagerelease sourcepackagereleases"> | 130 | <tr tal:repeat="spph spphs"> |
365 | 131 | <tal:define define="spr sourcepackagerelease; | 131 | <tal:define define="spr spph/sourcepackagerelease; |
366 | 132 | distroseries spr/upload_distroseries"> | 132 | distroseries spr/upload_distroseries"> |
367 | 133 | <td> | 133 | <td> |
368 | 134 | <a tal:attributes="href string:${distroseries/distribution/fmt:url}/+source/${spr/name}" | 134 | <a tal:attributes="href string:${distroseries/distribution/fmt:url}/+source/${spr/name}" |
369 | @@ -154,27 +154,27 @@ | |||
370 | 154 | 2005-10-24 | 154 | 2005-10-24 |
371 | 155 | </td> | 155 | </td> |
372 | 156 | <td> | 156 | <td> |
374 | 157 | <tal:needs_building condition="spr/needs_building"> | 157 | <tal:needs_building condition="spph/needs_building"> |
375 | 158 | Not yet built | 158 | Not yet built |
376 | 159 | </tal:needs_building> | 159 | </tal:needs_building> |
379 | 160 | <tal:built condition="not: spr/needs_building"> | 160 | <tal:built condition="not: spph/needs_building"> |
380 | 161 | <tal:failed repeat="build spr/failed_builds"> | 161 | <tal:failed repeat="build spph/failed_builds"> |
381 | 162 | <a tal:attributes="href build/fmt:url" | 162 | <a tal:attributes="href build/fmt:url" |
382 | 163 | tal:content="build/distro_arch_series/architecturetag" /> | 163 | tal:content="build/distro_arch_series/architecturetag" /> |
383 | 164 | </tal:failed> | 164 | </tal:failed> |
385 | 165 | <tal:not_failed condition="not: spr/failed_builds"> | 165 | <tal:not_failed condition="not: spph/failed_builds"> |
386 | 166 | None | 166 | None |
387 | 167 | </tal:not_failed> | 167 | </tal:not_failed> |
388 | 168 | </tal:built> | 168 | </tal:built> |
389 | 169 | </td> | 169 | </td> |
390 | 170 | <td style="text-align: right"> | 170 | <td style="text-align: right"> |
391 | 171 | <a tal:attributes="href string:${spr/distrosourcepackage/fmt:url}/+bugs" | 171 | <a tal:attributes="href string:${spr/distrosourcepackage/fmt:url}/+bugs" |
393 | 172 | tal:content="spr/open_bugs"> | 172 | tal:content="spph/open_bugs"> |
394 | 173 | </a> | 173 | </a> |
395 | 174 | </td> | 174 | </td> |
396 | 175 | <td style="text-align: right"> | 175 | <td style="text-align: right"> |
397 | 176 | <a tal:attributes="href string:${spr/distrosourcepackage/fmt:url}/+questions" | 176 | <a tal:attributes="href string:${spr/distrosourcepackage/fmt:url}/+questions" |
399 | 177 | tal:content="spr/open_questions"> | 177 | tal:content="spph/open_questions"> |
400 | 178 | </a> | 178 | </a> |
401 | 179 | </td> | 179 | </td> |
402 | 180 | </tal:define> | 180 | </tal:define> |
403 | 181 | 181 | ||
404 | === modified file 'lib/lp/registry/templates/person-related-software.pt' | |||
405 | --- lib/lp/registry/templates/person-related-software.pt 2010-09-29 20:59:15 +0000 | |||
406 | +++ lib/lp/registry/templates/person-related-software.pt 2011-09-19 07:53:32 +0000 | |||
407 | @@ -21,8 +21,8 @@ | |||
408 | 21 | <div id="packages"> | 21 | <div id="packages"> |
409 | 22 | 22 | ||
410 | 23 | <tal:maintained-packages | 23 | <tal:maintained-packages |
413 | 24 | define="sourcepackagereleases view/latest_maintained_packages_with_stats" | 24 | define="spphs view/latest_maintained_packages_with_stats" |
414 | 25 | condition="sourcepackagereleases"> | 25 | condition="spphs"> |
415 | 26 | 26 | ||
416 | 27 | <div class="top-portlet"> | 27 | <div class="top-portlet"> |
417 | 28 | <h2>Maintained packages</h2> | 28 | <h2>Maintained packages</h2> |
418 | @@ -41,15 +41,15 @@ | |||
419 | 41 | </tr> | 41 | </tr> |
420 | 42 | </thead> | 42 | </thead> |
421 | 43 | <tbody> | 43 | <tbody> |
423 | 44 | <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" /> | 44 | <div metal:use-macro="context/@@+person-macros/spph-rows" /> |
424 | 45 | </tbody> | 45 | </tbody> |
425 | 46 | </table> | 46 | </table> |
426 | 47 | </div> | 47 | </div> |
427 | 48 | </tal:maintained-packages> | 48 | </tal:maintained-packages> |
428 | 49 | 49 | ||
429 | 50 | <tal:uploaded-packages | 50 | <tal:uploaded-packages |
432 | 51 | define="sourcepackagereleases view/latest_uploaded_but_not_maintained_packages_with_stats" | 51 | define="spphs view/latest_uploaded_but_not_maintained_packages_with_stats" |
433 | 52 | condition="sourcepackagereleases"> | 52 | condition="spphs"> |
434 | 53 | 53 | ||
435 | 54 | <div class="top-portlet"> | 54 | <div class="top-portlet"> |
436 | 55 | <h2>Uploaded packages</h2> | 55 | <h2>Uploaded packages</h2> |
437 | @@ -68,14 +68,14 @@ | |||
438 | 68 | </tr> | 68 | </tr> |
439 | 69 | </thead> | 69 | </thead> |
440 | 70 | 70 | ||
442 | 71 | <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" /> | 71 | <div metal:use-macro="context/@@+person-macros/spph-rows" /> |
443 | 72 | </table> | 72 | </table> |
444 | 73 | </div> | 73 | </div> |
445 | 74 | </tal:uploaded-packages> | 74 | </tal:uploaded-packages> |
446 | 75 | 75 | ||
447 | 76 | <tal:ppa-packages | 76 | <tal:ppa-packages |
450 | 77 | define="sourcepackagereleases view/latest_uploaded_ppa_packages_with_stats" | 77 | define="spphs view/latest_uploaded_ppa_packages_with_stats" |
451 | 78 | condition="sourcepackagereleases"> | 78 | condition="spphs"> |
452 | 79 | 79 | ||
453 | 80 | <div class="top-portlet"> | 80 | <div class="top-portlet"> |
454 | 81 | <h2>PPA packages</h2> | 81 | <h2>PPA packages</h2> |
455 | @@ -94,7 +94,7 @@ | |||
456 | 94 | </tr> | 94 | </tr> |
457 | 95 | </thead> | 95 | </thead> |
458 | 96 | 96 | ||
460 | 97 | <div metal:use-macro="template/macros/sourcepackagerelease-ppa-rows" /> | 97 | <div metal:use-macro="template/macros/spph-ppa-rows" /> |
461 | 98 | </table> | 98 | </table> |
462 | 99 | </div> | 99 | </div> |
463 | 100 | </tal:ppa-packages> | 100 | </tal:ppa-packages> |
464 | @@ -153,14 +153,14 @@ | |||
465 | 153 | </div> | 153 | </div> |
466 | 154 | 154 | ||
467 | 155 | <metal:macros fill-slot="bogus"> | 155 | <metal:macros fill-slot="bogus"> |
469 | 156 | <metal:macro define-macro="sourcepackagerelease-ppa-rows"> | 156 | <metal:macro define-macro="spph-ppa-rows"> |
470 | 157 | <tal:comment replace="nothing"> | 157 | <tal:comment replace="nothing"> |
471 | 158 | This macro expects the following variables defined: | 158 | This macro expects the following variables defined: |
473 | 159 | :sourcepackagereleases: A list of SourcePackageRelease objects | 159 | :spphs: A list of SourcePackagePublishingHistory objects |
474 | 160 | </tal:comment> | 160 | </tal:comment> |
476 | 161 | <tr tal:repeat="sourcepackagerelease sourcepackagereleases" | 161 | <tr tal:repeat="spph spphs" |
477 | 162 | class="ppa_row"> | 162 | class="ppa_row"> |
479 | 163 | <tal:block define="spr sourcepackagerelease; | 163 | <tal:block define="spr spph/sourcepackagerelease; |
480 | 164 | distroseries spr/upload_distroseries; | 164 | distroseries spr/upload_distroseries; |
481 | 165 | ppa spr/upload_archive"> | 165 | ppa spr/upload_archive"> |
482 | 166 | <td tal:content="spr/sourcepackagename/name"> | 166 | <td tal:content="spr/sourcepackagename/name"> |
483 | @@ -180,15 +180,15 @@ | |||
484 | 180 | 2005-10-24 | 180 | 2005-10-24 |
485 | 181 | </td> | 181 | </td> |
486 | 182 | <td> | 182 | <td> |
488 | 183 | <tal:block condition="spr/needs_building"> | 183 | <tal:block condition="spph/needs_building"> |
489 | 184 | Not yet built | 184 | Not yet built |
490 | 185 | </tal:block> | 185 | </tal:block> |
493 | 186 | <tal:block condition="not: spr/needs_building"> | 186 | <tal:block condition="not: spph/needs_building"> |
494 | 187 | <tal:block repeat="build spr/failed_builds"> | 187 | <tal:block repeat="build spph/failed_builds"> |
495 | 188 | <a tal:attributes="href build/fmt:url" | 188 | <a tal:attributes="href build/fmt:url" |
496 | 189 | tal:content="build/distro_arch_series/architecturetag" /> | 189 | tal:content="build/distro_arch_series/architecturetag" /> |
497 | 190 | </tal:block> | 190 | </tal:block> |
499 | 191 | <tal:block condition="not: spr/failed_builds"> | 191 | <tal:block condition="not: spph/failed_builds"> |
500 | 192 | None | 192 | None |
501 | 193 | </tal:block> | 193 | </tal:block> |
502 | 194 | </tal:block> | 194 | </tal:block> |
503 | 195 | 195 | ||
504 | === modified file 'lib/lp/soyuz/stories/soyuz/xx-person-packages.txt' | |||
505 | --- lib/lp/soyuz/stories/soyuz/xx-person-packages.txt 2010-12-17 23:17:55 +0000 | |||
506 | +++ lib/lp/soyuz/stories/soyuz/xx-person-packages.txt 2011-09-19 07:53:32 +0000 | |||
507 | @@ -96,6 +96,7 @@ | |||
508 | 96 | 1...5 of 7 results | 96 | 1...5 of 7 results |
509 | 97 | ... | 97 | ... |
510 | 98 | Name Uploaded to Version When Failures Bugs Questions | 98 | Name Uploaded to Version When Failures Bugs Questions |
511 | 99 | ... | ||
512 | 99 | alsa-utils Debian Sid 1.0.9a-4 2005-07-01 None 0 0 | 100 | alsa-utils Debian Sid 1.0.9a-4 2005-07-01 None 0 0 |
513 | 100 | ... | 101 | ... |
514 | 101 | 102 | ||
515 | @@ -122,6 +123,7 @@ | |||
516 | 122 | 1...5 of 6 results | 123 | 1...5 of 6 results |
517 | 123 | ... | 124 | ... |
518 | 124 | Name Uploaded to Version When Failures Bugs Questions | 125 | Name Uploaded to Version When Failures Bugs Questions |
519 | 126 | ... | ||
520 | 125 | foobar Ubuntu Breezy-autotest 1.0 2006-12-01 i386 0 0 | 127 | foobar Ubuntu Breezy-autotest 1.0 2006-12-01 i386 0 0 |
521 | 126 | ... | 128 | ... |
522 | 127 | 129 | ||
523 | @@ -312,20 +314,28 @@ | |||
524 | 312 | 314 | ||
525 | 313 | This makes the package appear in the listings again because the primary | 315 | This makes the package appear in the listings again because the primary |
526 | 314 | archive is public. | 316 | archive is public. |
527 | 317 | XXX: The public package should be displayed, this will be fixed in a dependant | ||
528 | 318 | branch. | ||
529 | 315 | 319 | ||
530 | 316 | >>> MemcachedLayer.purge() | 320 | >>> MemcachedLayer.purge() |
531 | 317 | >>> user_browser.open("http://launchpad.dev/~cprov/+related-software") | 321 | >>> user_browser.open("http://launchpad.dev/~cprov/+related-software") |
535 | 318 | >>> print_ppa_rows(user_browser) | 322 | >>> user_browser.getLink("Uploaded packages").click() |
536 | 319 | source1 PPA named p3a for Celso... - Ubuntutest Breezy-autotest 666 | 323 | >>> print extract_text(find_tag_by_id(user_browser.contents, 'packages')) |
537 | 320 | ...ago None - - | 324 | ... |
538 | 325 | Name Uploaded to Version When Failures Bugs Questions | ||
539 | 326 | Celso Providelo has not uploaded any packages. | ||
540 | 321 | 327 | ||
541 | 322 | >>> anon_browser.open("http://launchpad.dev/~cprov/+related-software") | 328 | >>> anon_browser.open("http://launchpad.dev/~cprov/+related-software") |
545 | 323 | >>> print_ppa_rows(anon_browser) | 329 | >>> anon_browser.getLink("Uploaded packages").click() |
546 | 324 | source1 PPA named p3a for Celso... - Ubuntutest Breezy-autotest 666 | 330 | >>> print extract_text(find_tag_by_id(anon_browser.contents, 'packages')) |
547 | 325 | ...ago None - - | 331 | Name Uploaded to Version When Failures Bugs Questions |
548 | 332 | Celso Providelo has not uploaded any packages. | ||
549 | 326 | 333 | ||
550 | 327 | Even after the package is superseded, the package remains visibile in | 334 | Even after the package is superseded, the package remains visibile in |
551 | 328 | the listings. | 335 | the listings. |
552 | 336 | XXX: The public package should be displayed, this will be fixed in a dependant | ||
553 | 337 | branch. | ||
554 | 338 | |||
555 | 329 | 339 | ||
556 | 330 | >>> login("foo.bar@canonical.com") | 340 | >>> login("foo.bar@canonical.com") |
557 | 331 | >>> discard = source1_ubuntu.supersede() | 341 | >>> discard = source1_ubuntu.supersede() |
558 | @@ -334,14 +344,17 @@ | |||
559 | 334 | 344 | ||
560 | 335 | >>> MemcachedLayer.purge() | 345 | >>> MemcachedLayer.purge() |
561 | 336 | >>> user_browser.open("http://launchpad.dev/~cprov/+related-software") | 346 | >>> user_browser.open("http://launchpad.dev/~cprov/+related-software") |
565 | 337 | >>> print_ppa_rows(user_browser) | 347 | >>> user_browser.getLink("Uploaded packages").click() |
566 | 338 | source1 PPA named p3a for Celso... - Ubuntutest Breezy-autotest 666 | 348 | >>> print extract_text(find_tag_by_id(user_browser.contents, 'packages')) |
567 | 339 | ...ago None - - | 349 | Name Uploaded to Version When Failures Bugs Questions |
568 | 350 | Celso Providelo has not uploaded any packages. | ||
569 | 340 | 351 | ||
570 | 341 | >>> anon_browser.open("http://launchpad.dev/~cprov/+related-software") | 352 | >>> anon_browser.open("http://launchpad.dev/~cprov/+related-software") |
571 | 342 | >>> print_ppa_rows(anon_browser) | 353 | >>> print_ppa_rows(anon_browser) |
574 | 343 | source1 PPA named p3a for Celso... - Ubuntutest Breezy-autotest 666 | 354 | >>> anon_browser.getLink("Uploaded packages").click() |
575 | 344 | ...ago None - - | 355 | >>> print extract_text(find_tag_by_id(anon_browser.contents, 'packages')) |
576 | 356 | Name Uploaded to Version When Failures Bugs Questions | ||
577 | 357 | Celso Providelo has not uploaded any packages. | ||
578 | 345 | 358 | ||
579 | 346 | 359 | ||
580 | 347 | Packages deleted from a PPA | 360 | Packages deleted from a PPA |
581 | @@ -356,10 +369,10 @@ | |||
582 | 356 | 369 | ||
583 | 357 | >>> admin_browser.open("http://launchpad.dev/~cprov/+related-software") | 370 | >>> admin_browser.open("http://launchpad.dev/~cprov/+related-software") |
584 | 358 | >>> print_ppa_rows(admin_browser) | 371 | >>> print_ppa_rows(admin_browser) |
585 | 372 | source2 PPA named p3a for No Priv... - Ubuntutest Breezy-autotest 666 | ||
586 | 373 | ...ago None - - | ||
587 | 359 | source1 PPA named p3a for Celso... - Ubuntutest Breezy-autotest 666 | 374 | source1 PPA named p3a for Celso... - Ubuntutest Breezy-autotest 666 |
588 | 360 | ...ago None - - | 375 | ...ago None - - |
589 | 361 | source2 PPA named p3a for No Priv... - Ubuntutest Breezy-autotest 666 | ||
590 | 362 | ...ago None - - | ||
591 | 363 | 376 | ||
592 | 364 | Then delete the 'source2' package. | 377 | Then delete the 'source2' package. |
593 | 365 | 378 | ||
594 | 366 | 379 | ||
595 | === modified file 'lib/lp/soyuz/templates/person-maintained-packages.pt' | |||
596 | --- lib/lp/soyuz/templates/person-maintained-packages.pt 2009-09-08 14:37:17 +0000 | |||
597 | +++ lib/lp/soyuz/templates/person-maintained-packages.pt 2011-09-19 07:53:32 +0000 | |||
598 | @@ -25,9 +25,9 @@ | |||
599 | 25 | replace="structure view/batchnav/@@+navigation-links-upper" /> | 25 | replace="structure view/batchnav/@@+navigation-links-upper" /> |
600 | 26 | 26 | ||
601 | 27 | <tal:maintained-packages | 27 | <tal:maintained-packages |
603 | 28 | define="sourcepackagereleases view/batch"> | 28 | define="spphs view/batch"> |
604 | 29 | 29 | ||
606 | 30 | <table class="listing" condition="sourcepackagereleases"> | 30 | <table class="listing" condition="spphs"> |
607 | 31 | <thead> | 31 | <thead> |
608 | 32 | <tr> | 32 | <tr> |
609 | 33 | <th>Name</th> | 33 | <th>Name</th> |
610 | @@ -40,14 +40,14 @@ | |||
611 | 40 | </tr> | 40 | </tr> |
612 | 41 | </thead> | 41 | </thead> |
613 | 42 | <tbody> | 42 | <tbody> |
615 | 43 | <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows"/> | 43 | <div metal:use-macro="context/@@+person-macros/spph-rows"/> |
616 | 44 | </tbody> | 44 | </tbody> |
617 | 45 | </table> | 45 | </table> |
618 | 46 | 46 | ||
619 | 47 | <tal:navigation_bottom | 47 | <tal:navigation_bottom |
620 | 48 | replace="structure view/batchnav/@@+navigation-links-lower" /> | 48 | replace="structure view/batchnav/@@+navigation-links-lower" /> |
621 | 49 | 49 | ||
623 | 50 | <tal:no_packages condition="not: sourcepackagereleases"> | 50 | <tal:no_packages condition="not: spphs"> |
624 | 51 | <tal:name replace="context/fmt:displayname"/> | 51 | <tal:name replace="context/fmt:displayname"/> |
625 | 52 | does not maintain any packages. | 52 | does not maintain any packages. |
626 | 53 | </tal:no_packages> | 53 | </tal:no_packages> |
627 | 54 | 54 | ||
628 | === modified file 'lib/lp/soyuz/templates/person-ppa-packages.pt' | |||
629 | --- lib/lp/soyuz/templates/person-ppa-packages.pt 2010-06-10 08:29:19 +0000 | |||
630 | +++ lib/lp/soyuz/templates/person-ppa-packages.pt 2011-09-19 07:53:32 +0000 | |||
631 | @@ -25,9 +25,9 @@ | |||
632 | 25 | replace="structure view/batchnav/@@+navigation-links-upper" /> | 25 | replace="structure view/batchnav/@@+navigation-links-upper" /> |
633 | 26 | 26 | ||
634 | 27 | <tal:ppa-packages | 27 | <tal:ppa-packages |
636 | 28 | define="sourcepackagereleases view/batch"> | 28 | define="spphs view/batch"> |
637 | 29 | 29 | ||
639 | 30 | <table class="listing" condition="sourcepackagereleases"> | 30 | <table class="listing" condition="spphs"> |
640 | 31 | <thead> | 31 | <thead> |
641 | 32 | <tr> | 32 | <tr> |
642 | 33 | <th>Name</th> | 33 | <th>Name</th> |
643 | @@ -38,14 +38,14 @@ | |||
644 | 38 | </tr> | 38 | </tr> |
645 | 39 | </thead> | 39 | </thead> |
646 | 40 | <tbody> | 40 | <tbody> |
648 | 41 | <div metal:use-macro="template/macros/sourcepackagerelease-ppa-rows" /> | 41 | <div metal:use-macro="template/macros/spph-ppa-rows" /> |
649 | 42 | </tbody> | 42 | </tbody> |
650 | 43 | </table> | 43 | </table> |
651 | 44 | 44 | ||
652 | 45 | <tal:navigation_bottom | 45 | <tal:navigation_bottom |
653 | 46 | replace="structure view/batchnav/@@+navigation-links-lower" /> | 46 | replace="structure view/batchnav/@@+navigation-links-lower" /> |
654 | 47 | 47 | ||
656 | 48 | <tal:no_packages condition="not: sourcepackagereleases"> | 48 | <tal:no_packages condition="not: spphs"> |
657 | 49 | <tal:name replace="context/fmt:displayname"/> has no related PPA packages. | 49 | <tal:name replace="context/fmt:displayname"/> has no related PPA packages. |
658 | 50 | </tal:no_packages> | 50 | </tal:no_packages> |
659 | 51 | 51 | ||
660 | @@ -55,14 +55,14 @@ | |||
661 | 55 | </div> | 55 | </div> |
662 | 56 | 56 | ||
663 | 57 | <metal:macros fill-slot="bogus"> | 57 | <metal:macros fill-slot="bogus"> |
665 | 58 | <metal:macro define-macro="sourcepackagerelease-ppa-rows"> | 58 | <metal:macro define-macro="spph-ppa-rows"> |
666 | 59 | <tal:comment replace="nothing"> | 59 | <tal:comment replace="nothing"> |
667 | 60 | This macro expects the following variables defined: | 60 | This macro expects the following variables defined: |
669 | 61 | :sourcepackagereleases: A list of SourcePackageRelease objects | 61 | :spphs: A list of SourcePackagePublishingHistory objects |
670 | 62 | </tal:comment> | 62 | </tal:comment> |
672 | 63 | <tr tal:repeat="sourcepackagerelease sourcepackagereleases" | 63 | <tr tal:repeat="spph spphs" |
673 | 64 | class="ppa_row"> | 64 | class="ppa_row"> |
675 | 65 | <tal:block define="spr sourcepackagerelease; | 65 | <tal:block define="spr spph/sourcepackagerelease; |
676 | 66 | distroseries spr/upload_distroseries; | 66 | distroseries spr/upload_distroseries; |
677 | 67 | ppa spr/upload_archive"> | 67 | ppa spr/upload_archive"> |
678 | 68 | <td tal:content="spr/sourcepackagename/name"> | 68 | <td tal:content="spr/sourcepackagename/name"> |
679 | @@ -82,15 +82,15 @@ | |||
680 | 82 | 2005-10-24 | 82 | 2005-10-24 |
681 | 83 | </td> | 83 | </td> |
682 | 84 | <td> | 84 | <td> |
684 | 85 | <tal:block condition="spr/needs_building"> | 85 | <tal:block condition="spph/needs_building"> |
685 | 86 | Not yet built | 86 | Not yet built |
686 | 87 | </tal:block> | 87 | </tal:block> |
689 | 88 | <tal:block condition="not: spr/needs_building"> | 88 | <tal:block condition="not: spph/needs_building"> |
690 | 89 | <tal:block repeat="build spr/failed_builds"> | 89 | <tal:block repeat="build spph/failed_builds"> |
691 | 90 | <a tal:attributes="href build/fmt:url" | 90 | <a tal:attributes="href build/fmt:url" |
692 | 91 | tal:content="build/distro_arch_series/architecturetag" /> | 91 | tal:content="build/distro_arch_series/architecturetag" /> |
693 | 92 | </tal:block> | 92 | </tal:block> |
695 | 93 | <tal:block condition="not: spr/failed_builds"> | 93 | <tal:block condition="not: spph/failed_builds"> |
696 | 94 | None | 94 | None |
697 | 95 | </tal:block> | 95 | </tal:block> |
698 | 96 | </tal:block> | 96 | </tal:block> |
699 | 97 | 97 | ||
700 | === modified file 'lib/lp/soyuz/templates/person-uploaded-packages.pt' | |||
701 | --- lib/lp/soyuz/templates/person-uploaded-packages.pt 2009-09-08 14:37:17 +0000 | |||
702 | +++ lib/lp/soyuz/templates/person-uploaded-packages.pt 2011-09-19 07:53:32 +0000 | |||
703 | @@ -25,9 +25,9 @@ | |||
704 | 25 | replace="structure view/batchnav/@@+navigation-links-upper" /> | 25 | replace="structure view/batchnav/@@+navigation-links-upper" /> |
705 | 26 | 26 | ||
706 | 27 | <tal:uploaded-packages | 27 | <tal:uploaded-packages |
708 | 28 | define="sourcepackagereleases view/batch"> | 28 | define="spphs view/batch"> |
709 | 29 | 29 | ||
711 | 30 | <table class="listing" condition="sourcepackagereleases"> | 30 | <table class="listing" condition="spphs"> |
712 | 31 | <thead> | 31 | <thead> |
713 | 32 | <tr> | 32 | <tr> |
714 | 33 | <th>Name</th> | 33 | <th>Name</th> |
715 | @@ -40,14 +40,14 @@ | |||
716 | 40 | </tr> | 40 | </tr> |
717 | 41 | </thead> | 41 | </thead> |
718 | 42 | <tbody> | 42 | <tbody> |
720 | 43 | <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" /> | 43 | <div metal:use-macro="context/@@+person-macros/spph-rows" /> |
721 | 44 | </tbody> | 44 | </tbody> |
722 | 45 | </table> | 45 | </table> |
723 | 46 | 46 | ||
724 | 47 | <tal:navigation_bottom | 47 | <tal:navigation_bottom |
725 | 48 | replace="structure view/batchnav/@@+navigation-links-lower" /> | 48 | replace="structure view/batchnav/@@+navigation-links-lower" /> |
726 | 49 | 49 | ||
728 | 50 | <tal:no_packages condition="not: sourcepackagereleases"> | 50 | <tal:no_packages condition="not: spphs"> |
729 | 51 | <tal:name replace="context/fmt:displayname"/> has not uploaded any packages. | 51 | <tal:name replace="context/fmt:displayname"/> has not uploaded any packages. |
730 | 52 | </tal:no_packages> | 52 | </tal:no_packages> |
731 | 53 | 53 |
This branch looks good. I'm a little concerned about the change in sort order from getLatestMainta inedPackages as that change will be visible on the browser pages. Hope it isn't jarring.