Merge lp:~michael.nelson/launchpad/510331-syncsources-latest-pub into lp:launchpad
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/510331-syncsources-latest-pub | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
190 lines (+90/-22) 5 files modified
lib/lp/soyuz/doc/archive.txt (+11/-7) lib/lp/soyuz/interfaces/archive.py (+2/-2) lib/lp/soyuz/model/archive.py (+24/-11) lib/lp/soyuz/stories/webservice/xx-archive.txt (+9/-2) lib/lp/soyuz/tests/test_archive.py (+44/-0) |
||||
To merge this branch: | bzr merge lp:~michael.nelson/launchpad/510331-syncsources-latest-pub | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+18070@code.launchpad.net |
Commit message
Ensures that syncSources only chooses the latest *PUBLISHED* sources, rather than simply the latest sources.
To post a comment you must log in.
= Summary =
Fixes 510331 by ensuring that syncSources only finds pub records that are currently PUBLISHED.
== Proposed fix ==
== Pre-implementation notes ==
See note on the bug, as well as: syncSource( ) already allows you to specify the version... but with the solution you've suggested for syncSources()
<noodles> ok, sounds good. Also with bug 510331
<bigjools> noodles: yeah that one's easy
<noodles> IArchive.
<bigjools> ?
<noodles> it would mean that we'd not copy deleted sources even when there is no published one... is that expected?
<bigjools> yes, I think so
<noodles> OK. easy then.
<bigjools> well, would you expect it to?
<noodles> I'm imagining using the web ui, looking at a bunch of deleted sources and selecting them...
<bigjools> that's syncSource behaviour really
<bigjools> syncSources is more automatic
<bigjools> but we can make it explicit in the docstring
<noodles> OK.
== Implementation details ==
I wasn't sure of the best way to test the private helper method. I ended up going with removeSecurityP roxy() for the test, but would be happy to hear about a neater solution?
== Tests == stPublishedSour ces
bin/test -vvt doc/archive.txt -t TestCollectLate
== Demo and Q/A ==
We can Q/A this using the API on dogfood (or edge).
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: soyuz/doc/ archive. txt soyuz/tests/ test_archive. py soyuz/model/ archive. py
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ soyuz/model/ archive. py .event' (No module named lifecycle)
1099: [C0301] Line too long (81/78) -- fixed.
14: [F0401] Unable to import 'lazr.lifecycle