Merge lp://qastaging/~jml/pkgme/run-all-info-once into lp://qastaging/pkgme

Proposed by Jonathan Lange
Status: Merged
Approved by: James Westby
Approved revision: 149
Merged at revision: 150
Proposed branch: lp://qastaging/~jml/pkgme/run-all-info-once
Merge into: lp://qastaging/pkgme
Diff against target: 47 lines (+24/-3)
2 files modified
pkgme/package_files.py (+3/-3)
pkgme/tests/test_package_files.py (+21/-0)
To merge this branch: bzr merge lp://qastaging/~jml/pkgme/run-all-info-once
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+126478@code.qastaging.launchpad.net

Commit message

Only call all_info once

Description of the change

all_info was being called three times when packaging things for pkgme-service.

That's because PackageFiles.get_files() was using 'get_all' on the original
project_info object that it got three times. 'get_all' is a bit of a nasty
API, in that it pretty much always spawns a subprocess, unless it's a DictInfo.

The solution here is to wrap the results in a DictInfo. All the necessary
keys should be there.

I've added a test, which is a little clumsy.

cheers,
jml

To post a comment you must log in.
Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches