/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/bundle/apply_bundle.py

  • Committer: Vincent Ladeuil
  • Author(s): Jelmer Vernooij
  • Date: 2018-03-02 00:19:39 UTC
  • mfrom: (6861.4.5 pb-context)
  • Revision ID: v.ladeuil+lp@free.fr-20180302001939-9kv1b4jr2658oaz7
Make progress bars context managers.

Merged from https://code.launchpad.net/~jelmer/brz/pb-context/+merge/339449

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    custom_install = getattr(bundle_reader, 'install', None)
33
33
    if custom_install is not None:
34
34
        return custom_install(repository)
35
 
    with ui.ui_factory.nested_progress_bar() as pb, repository.lock_write():
 
35
    with repository.lock_write(), ui.ui_factory.nested_progress_bar() as pb:
36
36
        real_revisions = bundle_reader.real_revisions
37
37
        for i, revision in enumerate(reversed(real_revisions)):
38
38
            pb.update(gettext("Install revisions"), i, len(real_revisions))