Merge lp://qastaging/~mikemc/simplestreams/glance-extra-progress into lp://qastaging/~smoser/simplestreams/trunk

Proposed by Mike McCracken
Status: Merged
Merged at revision: 354
Proposed branch: lp://qastaging/~mikemc/simplestreams/glance-extra-progress
Merge into: lp://qastaging/~smoser/simplestreams/trunk
Diff against target: 197 lines (+105/-5)
3 files modified
simplestreams/mirrors/glance.py (+40/-2)
simplestreams/util.py (+39/-1)
tools/sstream-mirror-glance (+26/-2)
To merge this branch: bzr merge lp://qastaging/~mikemc/simplestreams/glance-extra-progress
Reviewer Review Type Date Requested Status
Scott Moser Pending
Review via email: mp+226171@code.qastaging.launchpad.net

Commit message

- Add support for per-file download progress callbacks to GlanceMirror

Description of the change

- Add support for per-file download progress callbacks to GlanceMirror

- Add simple progress_callback to util.get_local_copy to report when bytes are read.
- Add progress_callback to GlanceMIrror that uses get_local_copy's callback and adds more file metadata
- Add ItemInfoDryRunMirror subclass to perform dry-run sync in order to collect filenames and sizes
- Add util.ProgressAggregator superclass to keep track of too-frequent callbacks from GlanceMirror and call emit() every 1% of progress.
  - ProgressAggregator can be initialized with a dict of items to download, and will use that to keep track of the overall total.
- Modify tools/sstream-mirror-glance to use a ProgressAggregator subclass that prints to stdout

To post a comment you must log in.
353. By Mike McCracken

remove unused imports

354. By Mike McCracken

Add --progress flag to control download progress display and default to false

355. By Mike McCracken

merge with trunk

356. By Mike McCracken

pep8 fixes

Revision history for this message
Mike McCracken (mikemc) wrote :

Updated after review comments to add --progress flag and fix lint issues.

post-merge, new 'make check' with pyflakes works well for me.

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

to all changes: