Merge lp:~cjwatson/launchpad/publishinghistory-show-copier into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | William Grant on 2012-08-09 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15783 |
| Proposed branch: | lp:~cjwatson/launchpad/publishinghistory-show-copier |
| Merge into: | lp:launchpad |
| Diff against target: |
194 lines (+90/-5) 5 files modified
lib/lp/registry/browser/distributionsourcepackage.py (+10/-0) lib/lp/registry/browser/tests/test_distributionsourcepackage.py (+68/-2) lib/lp/soyuz/interfaces/publishing.py (+3/-0) lib/lp/soyuz/stories/ppa/xx-copy-packages.txt (+2/-1) lib/lp/soyuz/templates/packagepublishing-details.pt (+7/-2) |
| To merge this branch: | bzr merge lp:~cjwatson/launchpad/publishinghistory-show-copier |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| William Grant | code | Approve on 2012-08-09 | |
| Steve Kowalik (community) | code | 2012-08-04 | Approve on 2012-08-08 |
|
Review via email:
|
|||
Commit Message
Show the person who copied a source package, if available, in the publishing history.
Description of the Change
== Summary ==
There's no way to see who copied a package in the +publishinghistory UI; you have to wheel out the API and look at SPPH.creator. This is more cumbersome than it should be.
== Proposed fix ==
Add "by [creator]" to the template if we know who that is.
== LOC Rationale ==
+5. I have 3911 lines of credit.
== Tests ==
bin/test -vvct soyuz/stories/
== Demo and Q/A ==
Find a package that's been copied using a PCJ - the auto-syncer is a good source of these on old DB snapshots such as qastaging, so try https:/
| Colin Watson (cjwatson) wrote : | # |
The IRC discussion in question was:
| Colin Watson (cjwatson) wrote : | # |
I think I've addressed almost all of the comments William made on IRC. The exception is bug 851047, where I've left a comment on the bug explaining why that's hard to fix at the moment.
| William Grant (wgrant) wrote : | # |
I'm a bit wary about that high per-SPPH query count, but otherwise good. What sort of queries are they? I know there's a few for DistroSeries, but can't think what the other 9 would be.
| Colin Watson (cjwatson) wrote : | # |
I agree the high count is unpleasant, but I checked that it was the same
before this branch (or else I'd be worried), so it probably just
reflects +publishinghistory being dreadful already. Remember that those
10 queries are for two SPPHs.
Both SPPHs involve queries for Component and Section, and as you say
DistroSeries. Then there's Archive and Distribution in the case of the
copied SPPH, and an extra Person query for the archive owner there as
well. My count seems to be off by one somewhere but that's most of it.
I had a brief go at improving this, but I think it needs rather more
care than I have time for right now and should get independent review.
Given that bug 739066 exists, and this branch isn't a regression in
terms of query count as far as I can see, I think it would be best to
address the high per-SPPH count separately.

As discussed on IRC, this requires preloading of the people to avoid timeouts.