~jelmer/brz/bundle-git-plugin

« back to all changes in this revision

Viewing changes to breezy/bundle/serializer/v4.py

  • Committer: Jelmer Vernooij
  • Date: 2018-03-25 00:39:16 UTC
  • mfrom: (6926 work)
  • mto: This revision was merged to the branch mainline in revision 6928.
  • Revision ID: jelmer@jelmer.uk-20180325003916-mqa5uj4uq55hrjq9
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
675
675
        # inventory deltas to apply rather than calling add_inventory from
676
676
        # scratch each time.
677
677
        inventory_cache = lru_cache.LRUCache(10)
678
 
        pb = ui.ui_factory.nested_progress_bar()
679
 
        try:
 
678
        with ui.ui_factory.nested_progress_bar() as pb:
680
679
            num_records = len(records)
681
680
            for idx, (key, metadata, bytes) in enumerate(records):
682
681
                pb.update('installing inventory', idx, num_records)
717
716
                except errors.UnsupportedInventoryKind:
718
717
                    raise errors.IncompatibleRevision(repr(self._repository))
719
718
                inventory_cache[revision_id] = target_inv
720
 
        finally:
721
 
            pb.finished()
722
719
 
723
720
    def _handle_root(self, target_inv, parent_ids):
724
721
        revision_id = target_inv.revision_id