Merge ~cjwatson/launchpad:archive-translate-path-non-pool-multiple into launchpad:master
Proposed by
Colin Watson
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | b8e715ec5b98135fa2fbbb45a8362beca1b1979f |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cjwatson/launchpad:archive-translate-path-non-pool-multiple |
Merge into: | launchpad:master |
Diff against target: |
197 lines (+52/-27) 6 files modified
lib/lp/archivepublisher/publishing.py (+1/-4) lib/lp/soyuz/interfaces/archivefile.py (+5/-3) lib/lp/soyuz/model/archivefile.py (+6/-3) lib/lp/soyuz/tests/test_archivefile.py (+10/-2) lib/lp/soyuz/xmlrpc/archive.py (+3/-1) lib/lp/soyuz/xmlrpc/tests/test_archive.py (+27/-14) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jürgen Gmach | Approve | ||
Review via email: mp+431673@code.launchpad.net |
Commit message
Tolerate multiple non-pool files with the same name
Description of the change
This happens in practice when an file has been "condemned" (scheduled for deletion) but hasn't yet actually been deleted; publisher runs typically do this to old versions of archive metadata files when publishing new versions of them.
To post a comment you must log in.
I think this is the first time I have encountered a three-state-boolean / troolean? :-), at least in Python.
It took me a while to come to a conclusion whether this is clever or awkward and at the end, I think its both :-)
The issue is... it is impossible to know the three states with a high certainty without looking the param up.
This leaves two possible solutions: condemned_ files` and `include_ non_condemned_ files` _files` , `only_non_ condemned_ files`, `all_files`
- two booleans a la `include_
- enum a la `file_status`: `only_condemned
I think I like the enum much better.
I am sure you can come up with a better naming.