Merge lp:~cjwatson/launchpad/copy-packages-with-default-series into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Colin Watson on 2012-06-28 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | 15523 | ||||
| Proposed branch: | lp:~cjwatson/launchpad/copy-packages-with-default-series | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
397 lines (+135/-53) 8 files modified
lib/lp/registry/browser/distroseries.py (+2/-2) lib/lp/soyuz/browser/archive.py (+3/-5) lib/lp/soyuz/browser/tests/test_package_copying_mixin.py (+29/-0) lib/lp/soyuz/model/archive.py (+8/-18) lib/lp/soyuz/model/packagecopyjob.py (+6/-6) lib/lp/soyuz/scripts/packagecopier.py (+40/-19) lib/lp/soyuz/tests/test_archive.py (+43/-0) lib/lp/soyuz/tests/test_packagecopyjob.py (+4/-3) |
||||
| To merge this branch: | bzr merge lp:~cjwatson/launchpad/copy-packages-with-default-series | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Jelmer Vernooij (community) | code | 2012-06-28 | Approve on 2012-06-28 |
|
Review via email:
|
|||
Commit Message
Fix copying packages with the default target series (i.e. the source series).
Description of the Change
== Summary ==
In various places related to copying packages, Launchpad documents that passing a target series of None means that the target series will be the same as the source series (but in the target archive, of course). However, this doesn't actually work everywhere and OOPSes (bug 795005).
== Proposed fix ==
The OOPS itself is in check_copy_
I moved the bulk loading down from Archive.
Once this is fixed, it also becomes necessary to ensure that the PCJs have the correct target series in their metadata, rather than leaving it as None and deferring that decision to when the PCJ is run, since otherwise calls such as getPendingJobsF
== LOC Rationale ==
+59. This is part of allowing us to remove synchronous copying from the PPA UI, as well as eventually removing delayed copies. Besides, I have 2976 lines of credit.
== Tests ==
bin/test -vvct test_copyPackage -t test_packagecopyjob
I haven't explicitly added browser tests here. This is mainly because I actually ran into this bug while working on another branch to remove synchronous copying from the PPA UI, which caused a failure in lib/lp/
== Demo and Q/A ==
Find a PPA with packages in several series, create a new temporary PPA, and use Archive.
Get an admin to set the soyuz.derived_
== Lint ==
Just one false positive:
./lib/lp/
347: redefinition of function 'private' from line 343

It would be nice to add a test for the case where you're copying two packages with a different distroseries. Other than that, this looks good.